G
genzu
Hello Folks,
I WILL GIVE THE FIRST PERSON TO ANSWER
THIS QUESTION IN A MANNER THAT ACTUALLY
HELPS ME A FREE FOOTBAG (HACKY SACK)
FOR HELPING ME! Your choice of colors:
http://www.freedomfootbags.com/shop/the-mr-sandbag-footbag.html
This is probably easy to do, but I'm totally stuck right now...
I have columns of data that are 99.8% blank (technically,
they're not blank, they have been assigned ""), and
I'm trying to determine the first cell that has useful info
in it. For example Column AN has:
1.MISC STUFF
2.MISC STUFF
3.""
4.""
5.""
6.""
7.""
8.USEFUL DATA
9.USEFUL DATA
10.""
11.""
12.""
13.
14.
I'm trying to come up with a simple function that will tell me the
first row that has "useful data" in it based on a range search.
If the function was called "VERYSMART", you should be able
to go "VERYSMART(AN3:AN100)" and the result should be "8"
I've been working with the LASTINCOLUMN function:
--------------------------------
Function LASTINCOLUMN(rngInput As Range)
Dim WorkRange As Range
Dim i As Integer, CellCount As Integer
Application.Volatile
Set WorkRange = rngInput.Columns(1).EntireColumn
Set WorkRange = Intersect(WorkRange.Parent.UsedRange, WorkRange)
CellCount = WorkRange.Count
For i = CellCount To 1 Step -1
If Not IsEmpty(WorkRange(i)) Then
LASTINCOLUMN = WorkRange(i).Value
Exit Function
End If
Next i
End Function
-------------------------------
Now, LASINCOLUMN is a good starting point (I think),
but my Visual Basic skills are poor at best, and
I'm not sure where to go... For example, my cells
that contain "" are the result of a formula, so they
are NOT empty, and LASTINCOLUM is not helping me.
Thanks in advance for your help! Peace.
Daryl "Genzu Blades" Genz
Owner, Freedom Footbags
1998, 2000, 2001, 2002 Doubles Freestyle Footbag World Champ
http://www.freedomfootbags.com
(e-mail address removed)
Toll Free 1.866.KICKFREE (542.5373) 720.887.8226 (in Colorado
I WILL GIVE THE FIRST PERSON TO ANSWER
THIS QUESTION IN A MANNER THAT ACTUALLY
HELPS ME A FREE FOOTBAG (HACKY SACK)
FOR HELPING ME! Your choice of colors:
http://www.freedomfootbags.com/shop/the-mr-sandbag-footbag.html
This is probably easy to do, but I'm totally stuck right now...
I have columns of data that are 99.8% blank (technically,
they're not blank, they have been assigned ""), and
I'm trying to determine the first cell that has useful info
in it. For example Column AN has:
1.MISC STUFF
2.MISC STUFF
3.""
4.""
5.""
6.""
7.""
8.USEFUL DATA
9.USEFUL DATA
10.""
11.""
12.""
13.
14.
I'm trying to come up with a simple function that will tell me the
first row that has "useful data" in it based on a range search.
If the function was called "VERYSMART", you should be able
to go "VERYSMART(AN3:AN100)" and the result should be "8"
I've been working with the LASTINCOLUMN function:
--------------------------------
Function LASTINCOLUMN(rngInput As Range)
Dim WorkRange As Range
Dim i As Integer, CellCount As Integer
Application.Volatile
Set WorkRange = rngInput.Columns(1).EntireColumn
Set WorkRange = Intersect(WorkRange.Parent.UsedRange, WorkRange)
CellCount = WorkRange.Count
For i = CellCount To 1 Step -1
If Not IsEmpty(WorkRange(i)) Then
LASTINCOLUMN = WorkRange(i).Value
Exit Function
End If
Next i
End Function
-------------------------------
Now, LASINCOLUMN is a good starting point (I think),
but my Visual Basic skills are poor at best, and
I'm not sure where to go... For example, my cells
that contain "" are the result of a formula, so they
are NOT empty, and LASTINCOLUM is not helping me.
Thanks in advance for your help! Peace.
Daryl "Genzu Blades" Genz
Owner, Freedom Footbags
1998, 2000, 2001, 2002 Doubles Freestyle Footbag World Champ
http://www.freedomfootbags.com
(e-mail address removed)
Toll Free 1.866.KICKFREE (542.5373) 720.887.8226 (in Colorado