F
felciano
Hi --
I am trying to create a conditional concatenation function, similar to
Excel's built-in CONCATENATE function except (a) it works on ranges
and (b) you can provide a second range of values to test against and
select the values to use form the first range. This is similar to
COUNTIF, where you only count cells that match a certain criterion.
I've found some examples of doing range-based concatenation on the web
(e.g. http://www.cpearson.com/excel/stringconcatenation.aspx) but I
can't figure out how to do the secondary range-based criterion
checking. Basically I need to be able to pass a criterion into the
function such as ">5", walk the two ranges in parallel, and have that
test be applied to the current cell in the second range. AFAIK Excel
doesn't have an Eval function that would enable me to do this.
Can someone suggest a strategy or sample code to get me started on
this?
Thanks in advance for your time!
Ramon
I am trying to create a conditional concatenation function, similar to
Excel's built-in CONCATENATE function except (a) it works on ranges
and (b) you can provide a second range of values to test against and
select the values to use form the first range. This is similar to
COUNTIF, where you only count cells that match a certain criterion.
I've found some examples of doing range-based concatenation on the web
(e.g. http://www.cpearson.com/excel/stringconcatenation.aspx) but I
can't figure out how to do the secondary range-based criterion
checking. Basically I need to be able to pass a criterion into the
function such as ">5", walk the two ranges in parallel, and have that
test be applied to the current cell in the second range. AFAIK Excel
doesn't have an Eval function that would enable me to do this.
Can someone suggest a strategy or sample code to get me started on
this?
Thanks in advance for your time!
Ramon