G
Guest
Hello,Sirs,
i got a very useful smart udf [called mergem_con] from Gary's Student as
simple as follows: for pure numbers.
'*************
Function mergem_con(r As Range, s As String) As String
Dim once As Boolean
mergem_con = ""
once = False
For Each rr In r
v = rr.Value
If IsNumeric(v) And Not IsEmpty(v) Then
ss = "=" & v & s
If Evaluate(ss) Then
If once Then
mergem_con = mergem_con & "," & v
Else
mergem_con = v
once = True
End If
End If
End If
Next
End Function
'***************
This can have a result like (without #value error)
on b1=mergem_con(A2:A100,">1")
----
result is 1.2,1.25,1.33,1.5,1.05
which are located A33,A55,A66,A67,A99
based from the above result
i also need to grab the cell contents of the adjacent column B in same row
on cells B33,B55,B66,B67,B99.
with result like this ........[ C-33,B-55,S-66,RB-67,FG-99 ]
column B contains pure text only.
is it possible, to extend the UDF to collect the
1. cell address on Column A of the numerical result.
2. corresponding cell content on the adjacent cell(s) Student...
this may seem unusual question, but your unique help will do a lot of magic
for the desired eco-results.
thanks and more power to forum members,
romelsb the driller
i got a very useful smart udf [called mergem_con] from Gary's Student as
simple as follows: for pure numbers.
'*************
Function mergem_con(r As Range, s As String) As String
Dim once As Boolean
mergem_con = ""
once = False
For Each rr In r
v = rr.Value
If IsNumeric(v) And Not IsEmpty(v) Then
ss = "=" & v & s
If Evaluate(ss) Then
If once Then
mergem_con = mergem_con & "," & v
Else
mergem_con = v
once = True
End If
End If
End If
Next
End Function
'***************
This can have a result like (without #value error)
on b1=mergem_con(A2:A100,">1")
----
result is 1.2,1.25,1.33,1.5,1.05
which are located A33,A55,A66,A67,A99
based from the above result
i also need to grab the cell contents of the adjacent column B in same row
on cells B33,B55,B66,B67,B99.
with result like this ........[ C-33,B-55,S-66,RB-67,FG-99 ]
column B contains pure text only.
is it possible, to extend the UDF to collect the
1. cell address on Column A of the numerical result.
2. corresponding cell content on the adjacent cell(s) Student...
this may seem unusual question, but your unique help will do a lot of magic
for the desired eco-results.
thanks and more power to forum members,
romelsb the driller