How to write vba to evaluate the text font and size on an active cell range?

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have a web page download consists of the contact information like Name,
address and city etc. I opened it with the Excel and the information is
organized in the way that is impossible to import to an Access database.
However the "Name" is shown in a font and size differnt from other
information and this is only indication to seperate individual contact
information. How to write a vba to evaluate the test font and size on an
active cell range? Thanks.
 
Do you have xl2003 or xl2002. You can use Edit=>Find which supports
searching for a format. Turn on the macro recorder while you do it manually
to get the basic code.

Then look at Help on FindNext to see how to find multiple occurances.
 
Paul,

Something like:

For Each cell In Range("A1:A200")
If cell.Font.Name = "MS Sans Serif" And cell.Font.Size = 14 Then
cell.Interior.ColorIndex = 5
...... your code
End If

Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top