Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default trouble with simple loop . . .ARGH!

I am a newbie!

I am running a macro to dump timescaledata into excel. I want to bold each
subtotaled row(done with the subtotal command). I cannot for the life of me
figure out what I've done wrong. I want to cycle through the range, and
wherever the text includes the word "Total", bold the entire row.

JEff


==================================================
everything is declared . . . .

Set xlRng = xlRng.Columns("a")
xlRng.Select

For Each cell In xlRng
If Right(cell.Value, 5) = "Total" Then
EntireRow.Select.Font.Bold = True
End If
Next cell


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default trouble with simple loop . . .ARGH!

Buster, try

Dim cell as Range

For each cell In Range("A1:A1000").cells
If cell.Value Like "*Total*" Then
cell.EntireRow.Font.Bold = True
End If
Next cell

Good luck
Fred

"Buster" wrote in message
...
I am a newbie!

I am running a macro to dump timescaledata into excel. I want to bold each
subtotaled row(done with the subtotal command). I cannot for the life of

me
figure out what I've done wrong. I want to cycle through the range, and
wherever the text includes the word "Total", bold the entire row.

JEff


==================================================
everything is declared . . . .

Set xlRng = xlRng.Columns("a")
xlRng.Select

For Each cell In xlRng
If Right(cell.Value, 5) = "Total" Then
EntireRow.Select.Font.Bold = True
End If
Next cell




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TROUBLE WITH A SIMPLE FORMULA [email protected] Excel Discussion (Misc queries) 0 March 13th 07 08:33 PM
Trouble with simple percentage formula moushia New Users to Excel 3 February 28th 07 01:56 AM
Simple Formula Trouble FP Novice Excel Discussion (Misc queries) 3 August 4th 06 03:16 PM
Having trouble with simple macro! Simon Lloyd[_397_] Excel Programming 1 March 2nd 04 06:23 PM
Trouble with simple If and Else AlanN Excel Programming 5 August 8th 03 06:20 PM


All times are GMT +1. The time now is 01:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"