Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
esrei
 
Posts: n/a
Default macro to look for empty cell

What is the code for a makro to look for the first empty
cell in column A?
  #2   Report Post  
John Mansfield
 
Posts: n/a
Default

This code will color the first empty cell in the range A1:A10 yellow. When
the empty cell is found, the routine exits.

Sub FlagFirstEmpty()
Dim Rng As Range
For Each Rng In Range("A1:A10")
If IsEmpty(Rng) = True Then
Rng.Interior.ColorIndex = 6
Exit Sub
End If
Next
End Sub

----
Regards,
John Mansfield
http://www.pdbook.com

"esrei" wrote:

What is the code for a makro to look for the first empty
cell in column A?

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
Can I start a macro from a cell by using a formula PraxisPete Excel Worksheet Functions 1 April 8th 05 08:57 AM
Syntax for inferred cell references donesquire Excel Worksheet Functions 4 April 4th 05 09:29 PM
A Macro that will cut and paste to specific cell VBA12thRoundDraftPick Excel Discussion (Misc queries) 1 March 31st 05 06:11 AM
show macro security setting in a cell Mark Excel Worksheet Functions 3 March 21st 05 08:53 AM
Macro - - Automation Jac Excel Discussion (Misc queries) 8 December 27th 04 03:42 PM


All times are GMT +1. The time now is 12:31 AM.

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"