Ordering columns.

L

Lucio

Dear all,

I have the following problem: I have a column of data several thousands
cells long with values (let's call that D1), indexed by another column (let's
call that I1). I want to perform a division operation of the values in that
column by the values in another column of values (call that D2), which is
indexed in the same way by another column (let's call that I2). But I want to
do this operation only for equivalent index codes (le's say, divide the vale
indexed as I1=0001 in D1 by the value indexed as I2=0001 in D2).

Nevertheless, the index is not necessarily continuous (as example, if D1
has no value for the index I1=1495, this index doesn't exist in I1, but
I2=1495 will exist if there is a non-zero value for this item in D2, so this
index number and the related value exists in I2 and D2). How a can I order
and divide these series using EXCEL (my version is the 2003 one, BTW)? Can I
do this writing a logical function like 'IF' in some way?

Best,

Lucio.
 
L

Lucio

Thanks, worked like magic!

smartin said:
Hi Lucio,

Let's assume the following:
"I1" values are in column A
"D1" values are in column B
"I2" values are in column C
"D2" values are in column D

If the indexes are unique in each index column, this should work in cell
E1 and fill down:

=B1/vlookup(A1,C:D,2,false)

You will need to clean up for failed matches and possibly division by
zero errors.

This does not require sorting the lists, but it does require that your
index I2 is in a column to the left of your values D2. If your indexes
are arranged the other way around, there is another way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top