replacing values in cells from a pre-designed table

S

Sam Roberts

I am working with an Excel Spreadsheet. I have, in column C, a different value on each row: 1.2 or 0.7 or 2.5, etc. In column D I want to have Excel automatically place, in each row, a new value based on a reference table I would create.

For example

If column C value is Then column D value on same row will b

0.7 9
0.8 9
0.9 9
1.0 9
1.1 9
1.2 9
etc. etc

Seems like a simple task but I haven't figured how to automate it yet. Today I am entering column D values manually by reading off a table. Would like for the computer to do that

Thanks in advance for the help and advice.
 
P

Paul

Sam Roberts said:
I am working with an Excel Spreadsheet. I have, in column C, a different
value on each row: 1.2 or 0.7 or 2.5, etc. In column D I want to have Excel
automatically place, in each row, a new value based on a reference table I
would create.
For example:

If column C value is Then column D value on same row will be

0.7 92
0.8 93
0.9 94
1.0 94
1.1 93
1.2 92
etc. etc.

Seems like a simple task but I haven't figured how to automate it yet.
Today I am entering column D values manually by reading off a table. Would
like for the computer to do that.
Thanks in advance for the help and advice.

You need to type your table in somewhere (say in Sheet2) and use a VLOOKUP
formula in each cell of column D that will look up the corresponding column
C value in the table and return the appropriate value. The formula for D1
would be something like:
=VLOOKUP(C1,Sheet2!A1:B10,2,FALSE)
Obviously the range A1:B10 will depend on how many entries the table has.
The last parameter (FALSE) may need to change if your column C contains
values in between the values in the first column of your table (i.e. if you
want an approximate lookup). See VLOOKUP in Help for details.
 
J

Jason Morin

It appears that you need a simple VLOOKUP formula. MVP
John Walkenbach has an example on his website:

http://j-walk.com/ss/excel/usertips/tip080.htm

HTH
Jason
Atlanta, GA
-----Original Message-----
I am working with an Excel Spreadsheet. I have, in
column C, a different value on each row: 1.2 or 0.7 or
2.5, etc. In column D I want to have Excel automatically
place, in each row, a new value based on a reference table
I would create.
For example:

If column C value is Then column D value on same row will be
0.7 920.8 930.9 941.0 941.1 931.2 92etc. etc.
Seems like a simple task but I haven't figured how to
automate it yet. Today I am entering column D values
manually by reading off a table. Would like for the
computer to do that.
 
M

Max

Using VLOOKUP would be ideal

Assuming you have set-up somewhere
a 2-column range named: RefTable
(can be on another sheet)

where:

in 1st col = various values of col C (sorted in ascending order)
in 2nd col = corresponding values of col D

You could then put in D2
: =VLOOKUP(C2,RefTable,2,TRUE)

and copy D2 down col D

Col D will auto-populate based on the values in col C / in RefTable

--
hth
Max
-----------------------------------------
Please reply in thread

Use xdemechanik <at>yahoo<dot>com for email
----------------------------------------------------------------------------
Sam Roberts said:
I am working with an Excel Spreadsheet. I have, in column C, a different
value on each row: 1.2 or 0.7 or 2.5, etc. In column D I want to have Excel
automatically place, in each row, a new value based on a reference table I
would create.
For example:

If column C value is Then column D value on same row will be

0.7 92
0.8 93
0.9 94
1.0 94
1.1 93
1.2 92
etc. etc.

Seems like a simple task but I haven't figured how to automate it yet.
Today I am entering column D values manually by reading off a table. Would
like for the computer to do that.
 
Top