Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi
I need to do a basic if function. in cell A1 it may say "14" so in cell A2 I want to display another number ie "1", If A1 has changed to "18" I want A2 to display "2", If A1 changes again I need to display "3" etc. I need five changes all told, and I havn't got a clue. Any help will be appretiated. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Are they specific sets of numbers? I mean will A1 contain only ever 14, 18
......whatever the rest of the numbers are or do you mean *ANY* change of A1 index A2 up one. If the former then try: =IF(A1=14,1,IF(A1=18,2,IF(A1=22,3,IF(A1=26,4,IF(A1 =30,5,""))))) or if you mean "up to 14", "more then 14 and up to 18" then try: =IF(A126,5,IF(A122,4,IF(A118,3,IF(A114,2,IF(A1 0,1,""))))) If you mean *any* change then you will need VBA. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "neilb514" wrote in message ... Hi I need to do a basic if function. in cell A1 it may say "14" so in cell A2 I want to display another number ie "1", If A1 has changed to "18" I want A2 to display "2", If A1 changes again I need to display "3" etc. I need five changes all told, and I havn't got a clue. Any help will be appretiated. |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]() Hello Many thanks, your second example works perfect. neilb514 "Sandy Mann" wrote: Are they specific sets of numbers? I mean will A1 contain only ever 14, 18 ......whatever the rest of the numbers are or do you mean *ANY* change of A1 index A2 up one. If the former then try: =IF(A1=14,1,IF(A1=18,2,IF(A1=22,3,IF(A1=26,4,IF(A1 =30,5,""))))) or if you mean "up to 14", "more then 14 and up to 18" then try: =IF(A126,5,IF(A122,4,IF(A118,3,IF(A114,2,IF(A1 0,1,""))))) If you mean *any* change then you will need VBA. -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "neilb514" wrote in message ... Hi I need to do a basic if function. in cell A1 it may say "14" so in cell A2 I want to display another number ie "1", If A1 has changed to "18" I want A2 to display "2", If A1 changes again I need to display "3" etc. I need five changes all told, and I havn't got a clue. Any help will be appretiated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |