Given the following data:
A1: Random Text
A2:
A3: 32404899. 1.283362E+11 0.00025250 0.00284740 11.27683818
A4: 32433200. 1.251442E+11 0.00025917 0.00290908 11.22474968
A5: 32460185. 1.221073E+11 0.00026583 0.00297122 11.17700636
A6: 32486675. 1.192172E+11 0.00027250 0.00303356 11.13234580
A7: 32512893. 1.164641E+11 0.00027917 0.00309605 11.09031737
A8: 32538834. 1.138385E+11 0.00028583 0.00315867 11.05074584
A9: 32564470. 1.113315E+11 0.00029250 0.00322144 11.01346672
etc. for a few hundred more cells... (There is nothing in the second column,
these are just long strings)
I'm trying to come up with a formula that will Return the first
cell which has 0.003 in it (e.g. $A$6), without any intermediate formulas.
I know that 0.003 will always be in the 4th "column" of data, but the length
of the string can vary. Using a nice function I found, called "findn"
I figured out how to extract "0.003" from the 4th column
=MID(TRIM(A6),FindN(" ",TRIM(A6),3)+1,5)
(FindN finds the Nth occurrence of a the space " " within the string)
Where, in Visual Basic:
Function FindN(sFindWhat As String, _
sInputString As String, N As Integer) As Integer
Dim J As Integer
Application.Volatile
FindN = 0
For J = 1 To N
FindN = InStr(FindN + 1, sInputString, sFindWhat)
If FindN = 0 Then Exit For
Next
End Function
So I thing I'm part of the way there, if I put the above formula in column B,
and use MATCH command with ADDRESS, it gives me the cell of the
LAST one:
=ADDRESS(MATCH("0.003",B:B),1)
e.g. $A$9.
Excel Masters, is there a way to extract $A$6 from the above data without
using any intermediate formulas?? I sincerely appreciate any help!!
A1: Random Text
A2:
A3: 32404899. 1.283362E+11 0.00025250 0.00284740 11.27683818
A4: 32433200. 1.251442E+11 0.00025917 0.00290908 11.22474968
A5: 32460185. 1.221073E+11 0.00026583 0.00297122 11.17700636
A6: 32486675. 1.192172E+11 0.00027250 0.00303356 11.13234580
A7: 32512893. 1.164641E+11 0.00027917 0.00309605 11.09031737
A8: 32538834. 1.138385E+11 0.00028583 0.00315867 11.05074584
A9: 32564470. 1.113315E+11 0.00029250 0.00322144 11.01346672
etc. for a few hundred more cells... (There is nothing in the second column,
these are just long strings)
I'm trying to come up with a formula that will Return the first
cell which has 0.003 in it (e.g. $A$6), without any intermediate formulas.
I know that 0.003 will always be in the 4th "column" of data, but the length
of the string can vary. Using a nice function I found, called "findn"
I figured out how to extract "0.003" from the 4th column
=MID(TRIM(A6),FindN(" ",TRIM(A6),3)+1,5)
(FindN finds the Nth occurrence of a the space " " within the string)
Where, in Visual Basic:
Function FindN(sFindWhat As String, _
sInputString As String, N As Integer) As Integer
Dim J As Integer
Application.Volatile
FindN = 0
For J = 1 To N
FindN = InStr(FindN + 1, sInputString, sFindWhat)
If FindN = 0 Then Exit For
Next
End Function
So I thing I'm part of the way there, if I put the above formula in column B,
and use MATCH command with ADDRESS, it gives me the cell of the
LAST one:
=ADDRESS(MATCH("0.003",B:B),1)
e.g. $A$9.
Excel Masters, is there a way to extract $A$6 from the above data without
using any intermediate formulas?? I sincerely appreciate any help!!