LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how to check if a cell is populated or not?

Hello there
I am using a nested loop to read from an Excel workbook.
When I reach the first unused Cell, an "Object reference not set to an
instance of an object" error is generated.
How do I check if the cell if used or not?
I tried:
xbook.Application.Cells(I, 1).value().ToString.Length < 0
xbook.Application.Cells(i, 1).value() = Nothing
and both did not work.
Any ideas?
Regards
Sameh



 
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 restrict input in a cell until previous cell populated? FRUSTRATED_WITH_EXCEL Excel Discussion (Misc queries) 1 December 7th 09 06:01 PM
Last populated cell in a column RedFive Excel Discussion (Misc queries) 7 October 3rd 08 08:58 PM
First populated cell in row array/ Last populated cell in row arra Skyscan Excel Worksheet Functions 7 May 29th 08 05:20 PM
formula for a cell which is blank returns populated cell Gracey1 Excel Discussion (Misc queries) 1 February 2nd 07 09:17 AM
Check to see if a cell is populated bbmerc Excel Worksheet Functions 1 August 19th 05 04:15 PM


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