Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 78
Default Fill Blank cells in a range

Hi
I have a worksheet that i import data onto
i then count the number of rows and store the result in AM1
the problem is some of the cell are blank
What i want to do is check the range
from BH1 to BH (AM1 value) checking for Blank cells
if any are found put the Word "BLANK" in the cell



Thanks


Kevin

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 329
Default Fill Blank cells in a range

Hi Kevin,

Do you really need to fill the empty cells? Whilst you perhaps can't rely on COUNT or COUNTA for this, it occurs to me that what you
probably need is the number of the last data row. If so:
To find the row with the last numeric value in column A, use:
=MATCH(1E+306,A:A,1)
To find the row with the last text value in column A, use:
=MATCH("*",A:A,-1)

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"kevcar40" wrote in message oups.com...
Hi
I have a worksheet that i import data onto
i then count the number of rows and store the result in AM1
the problem is some of the cell are blank
What i want to do is check the range
from BH1 to BH (AM1 value) checking for Blank cells
if any are found put the Word "BLANK" in the cell



Thanks


Kevin


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default Fill Blank cells in a range

One way:

Dim rBlanks As Range
On Error Resume Next
Set rBlanks = Range("BH1:BH" & _
Range("AM1").Value).SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If Not rBlanks Is Nothing Then rBlanks.Value = "BLANK"

In article .com,
"kevcar40" wrote:

I have a worksheet that i import data onto
i then count the number of rows and store the result in AM1
the problem is some of the cell are blank
What i want to do is check the range
from BH1 to BH (AM1 value) checking for Blank cells
if any are found put the Word "BLANK" in the 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
Fill in blank cells Ian Excel Discussion (Misc queries) 3 December 15th 06 08:06 AM
automatically fill in blank cells?? AlaskaMX Excel Worksheet Functions 6 September 5th 06 05:32 PM
Fill blank cells with spaces [email protected] Excel Worksheet Functions 6 March 22nd 06 09:17 AM
FILL IN BLANK CELLS Charles Excel Discussion (Misc queries) 2 August 8th 05 07:07 PM
Fill blank cells jenny Excel Discussion (Misc queries) 2 January 7th 05 02:33 PM


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