Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Help Needed! Using complex IF function

Not sure whether =IF function is the correct on to use, but I need to test on values in column A, to see if the value is 1500 more (+) or less (-) than values in column B. I would also like to get an output in column C, so that if the result is "true" then a number "3" can be attributed for coding purposes

Please find an example of the data below;
A B
97081 21082
20825 21075
94347 21068
92611 21064
90761 21063
89252 21079
87686 21103
85975 21121
84529 21140
82294 21161
80661 21184
78868 21208
77240 21234
75546 21264
73510 21295
72018 21328
70542 21361
68904 21406
67779 21452
66134 21500
64702 21535
63281 21580

Thanks in advance

John
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Help Needed! Using complex IF function

On Wed, 31 Oct 2012 21:54:31 +0000, John Ball wrote:


Not sure whether =IF function is the correct on to use, but I need to
test on values in column A, to see if the value is 1500 more (+) or less
(-) than values in column B. I would also like to get an output in
column C, so that if the result is "true" then a number "3" can be
attributed for coding purposes

Please find an example of the data below;
A B
97081 21082
20825 21075
94347 21068
92611 21064
90761 21063
89252 21079
87686 21103
85975 21121
84529 21140
82294 21161
80661 21184
78868 21208
77240 21234
75546 21264
73510 21295
72018 21328
70542 21361
68904 21406
67779 21452
66134 21500
64702 21535
63281 21580

Thanks in advance

John


You need to more clearly state your requirements.
Is what you want to compare the values in the same row of column A & B?
In other words, do you want to compare only A1:B1 when putting a result in C1?
Or did you have something else in mind.

Also, you write you want to test if "1500 more (+) or less (-)".
Do you mean that the value in A is 1500 more than the value in Col B, or that the value in A is less than the value in colB?

In addition to the above, one interpretation would be that you want to test if there is a difference of 1500 between the values on the corresponding rows in col a and col b
Another interpretation, is there a difference of 1500 or more between the values.

If the last is what you really want, the formula would be:

=IF(ABS(A1-B1)=1500,3,"")

If you want something else, try to explain more clearly.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Help Needed! Using complex IF function

On Wed, 31 Oct 2012 22:03:36 -0400, Ron Rosenfeld wrote:

You need to more clearly state your requirements.
Is what you want to compare the values in the same row of column A & B?
In other words, do you want to compare only A1:B1 when putting a result in C1?
Or did you have something else in mind.

Also, you write you want to test if "1500 more (+) or less (-)".
Do you mean that the value in A is 1500 more than the value in Col B, or that the value in A is less than the value in colB?

In addition to the above, one interpretation would be that you want to test if there is a difference of 1500 between the values on the corresponding rows in col a and col b
Another interpretation, is there a difference of 1500 or more between the values.

If the last is what you really want, the formula would be:

=IF(ABS(A1-B1)=1500,3,"")

If you want something else, try to explain more clearly.


Taking your construction of your question very literally, and applying the 1500 difference only to the positive side, one could suggest:

=IF(OR((A1-B1)=1500,A1<B1),3,"")

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Help Needed! Using complex IF function

"John Ball" wrote:
Not sure whether =IF function is the correct on to use,
but I need to test on values in column A, to see if the
value is 1500 more (+) or less (-) than values in column B.
I would also like to get an output in column C, so that
if the result is "true" then a number "3" can be attributed
for coding purposes


Try:

=IF(ABS(A2-B2)<=1500,3,"")

You neglect to say what you want if column A is not within 1500 of column B.
I opted for the null string (""). Replace "" with something else if you
wish.

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
A complex formula, help needed Mac Excel Worksheet Functions 2 December 12th 09 06:14 PM
Complex function needed? JRD Excel Worksheet Functions 5 December 7th 09 11:23 PM
Help needed with setting up a complex directive cxlough41 Excel Programming 1 January 6th 06 04:46 AM
Complex formula help needed Jan Excel Worksheet Functions 0 November 9th 04 03:19 PM
Complex forumula help needed Jan Excel Worksheet Functions 0 November 9th 04 03:09 PM


All times are GMT +1. The time now is 08:25 AM.

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"