One column to another

  • Thread starter Make one column equal to another number
  • Start date
M

Make one column equal to another number

I am looking to make a number equal from one cell to another number. EX:
43=1, 42=2, 41=3, etc. going 43 to 1. here is how i have done it so far:
=IF(C13=43,"1",IF(C13=42,"2",
IF(C13=41,"3",IF(C13=40,"4",IF(C13=39,"5",IF(C13=38,"6",
IF(C13=37,"7",IF(C13=36,"8")))))))) I have used 6 cells to complete it and I
know that is not the best way to do it.
 
J

JLatham

Setup a table somewhere with all the possible combinations. It can be on
another sheet, and for this example, we'll say that is Sheet2, with your C13
cell back on Sheet1.

On Sheet2:
A B
1 43 1
2 42 2
3 43 3
4 39 5
5 38 6
continue as needed on down sheet 2 (and yes, I know I left out some pairs).
For the example below, I will assume that the list ends at row 43.

Then where you have your nested if formula you could use VLOOKUP() instead:
=VLOOKUP(C13,Sheet2!$A$1:$B$43,2,False)
 

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