Changing a Number in a Column Using Arrays?

C

carlsondaniel

I am trying to change a number in the left column to the number in the
adjacent column. My setup looks like this.


Number to Change Change to this Number
182001 182000
182002 182000
193002 193000

Code New Code (from the Change to this Number column)
181000 181000
182000 182000
182001 182000
182002 182000
193000 193000
193001 193001
193002 193000
193002 193000

Essentially, this is an accounting problem. I need to change certain
codes basically into a "rollup". I tried the array function but not
sure if I am using it correctly. The "Code", "The Number to
Change" and the "Change to this Number" are entered manually.
Any suggestions? Thank you!
 
J

Joerg

You've posted the same question to at least 3 Excel newsgroups. Please don't
cross-post.

Joerg
 
B

Bob Phillips

=IF(ISNA(VLOOKUP(A2,change_to_table,2,false)),A2,VLOOKUP(A2,change_to_table,
2,false))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
P

Pete_UK

If you essentially want to round down to a thousand, then this formula
will do that for you:

=ROUNDDOWN(A2,-3)

assuming your numbers are really numbers (not text codes) and that they
start in cell A2. Copy the formula down.

Hope this helps.

Pete
 
Top