Forum Discussion
devyadav2008
Jul 15, 2021Brass Contributor
Excel Conditional Formatting
How can i bold entire row in multiple sheets if cell text is grand total. please help because grand total row position in all sheets is different.
HansVogelaar
Jul 15, 2021MVP
Let's say the text "grand total" occurs in column A.
Select the entire range you want to format, or even all cells.
I will assume that the active cell in the selection is in row 1.
On the Home tab of the ribbon, select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter the formula
=LOWER($A1)="grand total"
Remember, A is the column that will contain "grand total", and 1 is the row number of the active cell.
Click Format...
Activate the Fill tab.
Select a highlight color.
Click OK, then click OK again.
devyadav2008
Jul 18, 2021Brass Contributor
Thank You Sir for your response...
But this will be work in single sheet, I have to change multiple sheets which have grand total in column A
But this will be work in single sheet, I have to change multiple sheets which have grand total in column A
- HansVogelaarJul 19, 2021MVP
You'll have to create a rule for each sheet. If you wish, you can do this with a macro.
Sub AddCF() Dim w As Worksheet For Each w In Worksheets ' or Worksheets(Array("Sheet1", "Sheet2", "SheetC")) With w.Cells.FormatConditions .Delete .Add(Type:=xlExpression, Formula1:="=LOWER($A1)=""grand total""").Interior.Color = vbYellow End With Next w End SubChange vbYellow to the color you want to use.