Oooh, I guarantee you are going to have fun with this one.
Hi!
Not sure which column of values you want to return, column D or E? Or both?
Anyhow, this will return the values from column E for each corresponfing
instance of "-CH".
Entered as an array using the key combination of CTRL,SHIFT,ENTER: (pay
attention to this statement! It means something!!)
=IF(ROWS($1:1)<=COUNTIF(C$1:C$7,"-CH"),INDEX(E$1:E$7,SMALL(IF(C$1:C$7="-CH",ROW(C$1:C$7)-ROW(C$1)+1),ROWS($1:1))),"")
Copy down until you get blanks.
Biff
"Clueless" wrote in message
...
Let us say I have 5 columns:
A / B / C / D / E
010101 / 01 / -V / 010101-01-V / 5
010101 / 02 / -V / 010101-02-V / 7
010101 / 07 / -CH / 010101-07-CH / 6.3
010101 / 03 / -V / 010101-03-V / 2.1
010101 / 12 / -CH / 010101-01-CH / 9.1
010101 / 04 / -V / 010101-04-V / 1215
010101 / 69 / -CH / 010101-69-CH / 32
And so on, for many many rows. Now, let us say the first 4 (A to D)
columns
are text, and column 4 (D) is a string of columns 1, 2 & 3. As you can
see,
the codes ending in CH are not consecutive numerically, nor next to each
other. My problem is this, I can not know what is the next -CH value after
the first without copying down a formula for at least two columns. I mean,
the first one I can find with no problem using
VLOOKUP("-CH",C1:D7,2,false).
Now, I would need to, based on the first -CH value (or any other means)
determine what the second is, and then the third based on the second and
so
on, to use a VLOOKUP formula to get at the values on column 5 (E).
Now the problem is compounded by the fact that I can not use filters or
any
other fancy methods ;) because some of the ppl that are going to be using
the
workbook hardly know how to open the file. Sorry for the lengthy
explanation,
but I believe it was necessary in order to understand the problem.
Thanks in advance for any help you can give me, and if you can't, well,
you
have helped me plenty in the past, so thanks anyway :D.
Regards,
Joe
|