Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default Find empty cell then stop

Hi,

I'd like to have a macro that does this:

1) for cells in column F that is a) not empty & b) greater than 3000000,
search thru column K for the first empty cell. If there is, a message box to
be shown for the cell address. Then the whole macro should stop.

Thanks,
Dolphin
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Find empty cell then stop

Perhaps?

Sub TryNow()
Dim myR As Long
Dim i As Long

myR = Cells(Rows.Count, 6).End(xlUp).Row

For i = 1 To myR
If Cells(i, 6).Value 3000000 And Cells(i, 11).Value = "" Then
MsgBox Cells(i, 11).Address
Exit Sub
End If
Next i
End Sub

HTH,
Bernie
MS Excel MVP


"Dolphinv4" wrote in message
...
Hi,

I'd like to have a macro that does this:

1) for cells in column F that is a) not empty & b) greater than 3000000,
search thru column K for the first empty cell. If there is, a message box to
be shown for the cell address. Then the whole macro should stop.

Thanks,
Dolphin



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
How to: Find first empty cell in column DW Excel Worksheet Functions 18 October 12th 07 05:57 AM
find first empty cell in column and start transpose next row in that cell ali Excel Discussion (Misc queries) 6 July 21st 07 11:55 PM
find last none empty cell kevcar40 Excel Discussion (Misc queries) 3 March 1st 06 12:59 PM
Find an empty cell and put a dash in it? markexcel Excel Worksheet Functions 5 October 12th 05 03:47 PM
Find a empty cell in next column Michael Excel Discussion (Misc queries) 3 June 15th 05 02:18 PM


All times are GMT +1. The time now is 03:41 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"