Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Searching for non null cells

I'd like to create a scrip that searches a column for non null cells. Then
when it finds the non null cell it displays the cell name (i.e a10)
any suggestions?

Thanks,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Searching for non null cells

Hi

Look at this:

Sub FindNonNullCells()
Dim TargetCol As String
Dim LastRow As Long

TargetCol = "A"
LastRow = Cells(Rows.Count, TargetCol).End(xlUp).Row

For r = 1 To LastRow
If Range(TargetCol & r).Value = "" Then
msg = MsgBox("Null cell found in : " & TargetCol & r)
End If
Next
End Sub

Regards,
Per

"Jeff" skrev i meddelelsen
...
I'd like to create a scrip that searches a column for non null cells.
Then
when it finds the non null cell it displays the cell name (i.e a10)
any suggestions?

Thanks,



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
Using NULL in shading cells Lenny Excel Worksheet Functions 2 April 9th 09 06:16 PM
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 04:30 PM
NULL Cells UnderCoverGuy Excel Worksheet Functions 4 October 31st 06 07:33 PM
Checking that any cells are null RFJ Excel Worksheet Functions 5 June 21st 05 01:21 PM
searching for a null cell in a column FutureWiz Excel Programming 4 January 8th 04 09:56 AM


All times are GMT +1. The time now is 06:56 AM.

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"