Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Find empty row and color

I've searched previous posts and can't find how to locate the first empty row
between text and color it black between Col A through H. Any help you can
give is appreciated, thank yoiu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Find empty row and color

Dim myRange as Range
Dim myRangeData as Variant
Dim myRows as long, myColumns as long, i as long, j as long

Application.Screenupdating = False
myRange = Activesheet.Range(whatever it is)
myRangeData = Activesheet.Range(whatever it is).Value
myRows = UBound(myRangeData,1)
myColumns = UBound(myRangeData,2)

For i = 1 to myRows
TempString = ""
For j = 1 to myColumns
TempString = TempString & myRangeData(i,,j)
next j
TempString = Trim(TempString)
If TempString = "" then
myRange.Rows(i).Interior.Colorindex = 1
end if
next i

regards
Paul


On Mar 14, 2:02 pm, SITCFanTN
wrote:
I've searched previous posts and can't find how to locate the first empty row
between text and color it black between Col A through H. Any help you can
give is appreciated, thank yoiu



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Find empty row and color

without knowing more about the layout of your data, I can only guess, but

cells(2,1).End(xldown)(2).Resize(1,8).Interior.col orIndex = 1

assumes the first empty row will be beyond row 3 and that column A can be
used to discover this row.

--
Regards,
Tom Ogilvy


"SITCFanTN" wrote:

I've searched previous posts and can't find how to locate the first empty row
between text and color it black between Col A through H. Any help you can
give is appreciated, thank yoiu

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
To find row is empty or not pol Excel Discussion (Misc queries) 2 July 27th 09 01:22 PM
Find first empty row [email protected] Excel Discussion (Misc queries) 3 July 29th 06 07:52 PM
Find first empty row Ragnar Midtskogen Excel Programming 9 October 11th 05 07:30 PM
Find last empty row poppy Excel Programming 5 July 7th 04 04:43 PM
Find Next Empty Row Myrna Rodriguez Excel Programming 3 June 9th 04 08:32 AM


All times are GMT +1. The time now is 12:24 PM.

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

About Us

"It's about Microsoft Excel"