change value in a cell according to another cells value

G

Guest

Please help me....
Example:
I need to make 1 = $50 and 2 = $100 and 3 = $120 etc
I need to do this by entering 1, 2 or 3 in column A and the value
automatically appearing in column D, is this possible?

Also I would like to hide a column and only show cells from that column in
the row that I apply value to in another cell of the same row. Essentially
hiding the whole column and only showing value in a row when the row is in
use.

Please help me, I want to create something for a job interview and can't
work it out!

Thank you so much whoever can answer this.
 
M

Max

Kylie Rose said:
.. I need to make 1 = $50 and 2 = $100 and 3 = $120 etc
I need to do this by entering 1, 2 or 3 in column A and the value
automatically appearing in column D, is this possible?

If the lookup list (1 = $50, 2 = $100, etc) isn't too long

Try in D1:
=IF(A1="","",IF(ISNA(MATCH(A1,{1;2;3},0)),"No match",
VLOOKUP(A1,{1,50;2,100;3,120},2,0)))
Copy D1 down as far as required

(I don't have a suggestion for your 2nd Q, sorry)

---
 
B

Biff

Hi!
I need to make 1 = $50 and 2 = $100 and 3 = $120 etc
I need to do this by entering 1, 2 or 3 in column A and the value
automatically appearing in column D, is this possible?
=LOOKUP(A1,{0,"";1,50;2,100;3,120})

Also I would like to hide a column and only show cells from that column in
the row that I apply value to in another cell of the same row. Essentially
hiding the whole column and only showing value in a row when the row is in
use.

You can do that using conditional formatting but you'd need to provide more
specific details.

Biff
 
M

Max

=LOOKUP(A1,{0,"";1,50;2,100;3,120})

If col A contains numbers higher than 3, I'm not sure if
the result returned: 120 would be a mite misleading here ?

---
 
B

Biff

I need to do this by entering 1, 2 or 3 in column A

I don't see anything that mentions values higher than 3.

Biff
 
M

Max

Biff said:
I don't see anything that mentions values higher than 3.

Agreed. But I was hinting at the possibility
of a "wrong" input of a number higher than
what is mentioned in the OP
(the built-in "error trap" part of it)

Anyway, the OP seems happy with both options <g>

---
 

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