Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a range AP4:AQ63 that has data in the top few cells in the range. The
remaining cells are empty (I use delete to clear them). I need a routine to read this range and return a smaller range that only has non-blank cells in it. For example, if there are only 15 rows filled in in the range, the function would return AP4:AQ19. I have a loop that goes through the range, I just need some help constructing the range to return. Here is what I have so far (thanks to snippets I've gotten from this forum): Function GetSubRange() As Range Dim r As Range Set r = Worksheets("Subs").Range("AP4") Do While Not r = "" Set r = r.Offset(1, 0) Loop GetSubRange = ??? End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find a textstring in a "Range" - and then return a value iftextstring is found. | Excel Programming | |||
function to return day in the form "Monday", "Tuesday" etc given . | Excel Worksheet Functions | |||
Check if cells contain the word "Thailand", return "TRUE" | Excel Worksheet Functions | |||
"No RETURN() or HALT() function found on macro sheet." | Excel Worksheet Functions | |||
use variable in Workbooks("book1").Worksheets("sheet1").Range("a1" | Excel Programming |