Forum Discussion
Trev63
Mar 31, 2023Copper Contributor
Excel
I need a formula that enters a value in one cell based on another. The entered value can be any one of five numbers i.e. If I enter 3 in cell A1, the adjacent cell A2 should display 3 or if I enter 4...
- Mar 31, 2023
=IF(A1=3,3,IF(A1=4,2,IF(A1=5,1,IF(A1=1,5,IF(A1=2,4,"")))))=CHOOSE(A1,5,4,3,2,1)In cell A2 you can try any of these formulas.
OliverScheurich
Apr 04, 2023Gold Contributor
=SORT(A2:B11,2,-1)Do you want to sort the numbers and associated names? Then you can try this formula if you have access to the SORT function. It's available in Office 365 and Excel 2021 and Excel for the web.
Trev63
Apr 04, 2023Copper Contributor
Many thanks for looking at this for me its much appreciated. I have 365 but I cant seem to get this to work. Want you have set out is exactly what I need but when it type the formula I get a error message. I can relate to your reference to A2 & B11 in the formula as that is the range but what does the ;2;-1 relate to? This is my version of your formula =SORTIEREN(H32:J43;2;-1)
- OliverScheurichApr 04, 2023Gold Contributor
Which version (language) of Excel do you work with?
In german excel the formula is:
=SORTIEREN(H32:J43;2;-1)
In english:
=SORT(H32:J43,2,-1)
2 is the column by which the range is sorted. -1 is for descending order.