insomniac53
Board Regular
- Joined
- Sep 3, 2013
- Messages
- 104
I tried to avoid asking this as similar questions have been asked many times, but I can't see the solution I need.
Briefly, I need a function [NextNonBlankRow], given a specific row number as a parameter, to return the next non-blank row, searching down.
So, if A100 contains a value and A105 contains a value, whilst all other cells are empty, then my function would be sent 100 and return 105.It would always search the same column so there's no need to send it the column letter - let's use A as the column for simplicity.
I am working along these lines but the syntax is wrong:
Thanks!
Briefly, I need a function [NextNonBlankRow], given a specific row number as a parameter, to return the next non-blank row, searching down.
So, if A100 contains a value and A105 contains a value, whilst all other cells are empty, then my function would be sent 100 and return 105.It would always search the same column so there's no need to send it the column letter - let's use A as the column for simplicity.
I am working along these lines but the syntax is wrong:
Code:
function NextNonBlankRow(rowstart as long) as long
NextNonBlankRow = Find(what:="*", after:=w1.Range("A" & rowstart), LookIn:=xlValues, SearchDirection:=xlDown).row
end function
Thanks!