diff --git a/packages/grid/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts b/packages/grid/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts
index ac622547f18e..0419d8824065 100644
--- a/packages/grid/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts
+++ b/packages/grid/x-data-grid-premium/src/hooks/features/cellSelection/useGridCellSelection.ts
@@ -486,7 +486,7 @@ export const useGridCellSelection = (
newClasses.push(gridClasses['cell--rangeTop']);
}
- if (rowIndex < visibleRows.range.lastRowIndex) {
+ if (rowIndex + visibleRows.range.firstRowIndex < visibleRows.range.lastRowIndex) {
const { id: nextRowId } = visibleRows.rows[rowIndex + 1];
if (!apiRef.current.unstable_isCellSelected(nextRowId, field)) {
newClasses.push(gridClasses['cell--rangeBottom']);
diff --git a/packages/grid/x-data-grid-premium/src/tests/cellSelection.DataGridPremium.test.tsx b/packages/grid/x-data-grid-premium/src/tests/cellSelection.DataGridPremium.test.tsx
index 30ddfc94dc73..2a17b8ed035c 100644
--- a/packages/grid/x-data-grid-premium/src/tests/cellSelection.DataGridPremium.test.tsx
+++ b/packages/grid/x-data-grid-premium/src/tests/cellSelection.DataGridPremium.test.tsx
@@ -2,7 +2,7 @@ import * as React from 'react';
import { stub, SinonStub } from 'sinon';
import { expect } from 'chai';
import { spyApi, getCell } from 'test/utils/helperFn';
-import { createRenderer, fireEvent, act, userEvent } from '@mui-internal/test-utils';
+import { createRenderer, fireEvent, act, userEvent, screen } from '@mui-internal/test-utils';
import {
DataGridPremium,
DataGridPremiumProps,
@@ -36,12 +36,12 @@ describe('