#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default if function

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,345
Default if function

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default if function


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"