Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Selecting the first non blank cell in Range


Hi,

Is the only way to select the first non blank cell in a range to use an
if statement.

e.g If D1 is the first cell in range A1 to F1 with info I want to
return 1 for A to for B and so on. So D1 would return 4

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=564240

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Selecting the first non blank cell in Range

Perhaps

MsgBox Range("A1").End(xlToRight).Offset(0, 1).Column


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"VBA Noob" wrote in
message ...

Hi,

Is the only way to select the first non blank cell in a range to use an
if statement.

e.g If D1 is the first cell in range A1 to F1 with info I want to
return 1 for A to for B and so on. So D1 would return 4

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile:

http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=564240



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Selecting the first non blank cell in Range


Thanks Bob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=564240

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
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Cell address in a range starguy Excel Discussion (Misc queries) 7 May 3rd 06 11:58 AM
Blank (empty) cell always equal to 0?? ulfah Excel Discussion (Misc queries) 3 February 1st 06 04:55 PM
copying cell names Al Excel Discussion (Misc queries) 12 August 11th 05 03:01 PM
blank cell turns to 0 LMB New Users to Excel 2 April 25th 05 03:57 PM


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