Interrogating cells by cell formatting

B

Bhupinder Rayat

Hi all

Is there anyway I can interrogate cells by what formatting they have?

For example, can I use an IF statement that tells excel to return the value
of a cell if it has a bold format, or otherwise return nothing?

I have a huge table of data that I have imported from word, that I need to
manipulate.

Any help would be much appreciated.


Regards,


Pinda.
 
I

Ian

You can with a macro. eg

Sub CopyIfBold()
For r = 1 To 10
If Cells(r, 1).Font.Bold = True Then
Cells(r, 2).Value = Cells(r, 1)
End If
Next r
End Sub

This copies values in column 1 (A) rows 1 to 10 to the corresponding cell in
column 2 (B) if the font in A is bold.
 
B

Bhupinder Rayat

Ian,

works like a dream. I can now edit the code to give me exactly what i want.
thank you for your help!


Pinda.
 
Top