![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 02:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com