Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting rows with for next loop...

Status
Not open for further replies.

fdgsogc

Vendor
Feb 26, 2004
160
CA
I have a table of data that I get into my Excel spreadsheet with a web query. All is fine there. However, when one gets data with a web query, it does not keep the formatting of the webpage.

I want to bold my rows that represent totals. I am thinking of looking for text with the word "Total" in it, then formatting the row containing that cell then look for more.

I'm junior to VBA. How do I create the for next loop and then how do I stop the loop from searching over and over again for the same text? My report is dynamic and will contain a different number of "totals" rows at any point in time.

Thanks in advance.
 


Hi,

Use the AutoFilter feature to select rows containing TOTAL.

Then select those rows and format in "one swell foop!"

Capture code via macro recorder.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Thanks a bunch.

Macro recorder is my friend.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top