another ques...color /font

  • Thread starter Thread starter monika
  • Start date Start date
M

monika

hi...

I am using with statement wrt to worksheets. I am putting a value of blank
cell for some cases....b4 doing that i want to fill the cell with yellow and
do certain other formatting.....

how do i use this in a case as below...

i tried .font...and it didn't work...

With Worksheets(rawDataWorksheetName).Cells(counter2, packColNum)
If .Value = "" Then
.Value = "Blank Cell"
flagPack = True
End If
End With

really thankful in advance
Monika
 
Hi Monika
try something like
With Worksheets(rawDataWorksheetName).Cells(counter2, packColNum)
If .Value = "" Then
.Value = "Blank Cell"
.Font.colorindex = 3 'red font color
.interior.colorindex = 6
.font.bold=True
flagPack = True
End If
End With

Frank
 
hi frank..

works perfectly ok

thanks
Monika
Frank Kabel said:
Hi Monika
try something like
With Worksheets(rawDataWorksheetName).Cells(counter2, packColNum)
If .Value = "" Then
.Value = "Blank Cell"
.Font.colorindex = 3 'red font color
.interior.colorindex = 6
.font.bold=True
flagPack = True
End If
End With

Frank
 
Back
Top