Hello,
I have a excel file generated from access. After exporting i have to do some formatting which i tried to do though excel automation. I need look the each cell value of column E in the same column. If it exists highlight and make it bold.
Here is my code snippet.
Please help me!!!
I have a excel file generated from access. After exporting i have to do some formatting which i tried to do though excel automation. I need look the each cell value of column E in the same column. If it exists highlight and make it bold.
Here is my code snippet.
Code:
'Find the last row
lstRow2 = .Application.Cells(.Rows.Count, "E").End(xlUp).Row
Debug.Print "lastRow:" & lstRow2
'Initialize the first row
Set frstRow = 3
Do Until lstRow2 = frstRow
'check if last row is empty then go to lastrow -1
If .Application.Rows("lstRow2:5") = " " Then
lstRow2 = lstRow2 - 1
'search the value in same column and if it is present, make it bold and 'highlight it. I don't how to write the code for this part :banghead:
Else if (search it in the same column (E)) = true then
highlight and bold it
lstRow2 = lstRow2 - 1
End if
loop