Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default using IF function with AND/OR

Hi

I have successfully used the IF function on my worksheet so that if two
conditions are met it will do one calculation or another

However I'd like to know if its possible to get it to work with three
conditions e.g

if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just
ignore the calculation and enter a zero or a blank space.

I've got as far as nesting the first logical part which works e.g.

=IF(AND(A1="y",B1="y"),F1*5%,F1*10%)

But it falls over if A1 is anything other than "y".

How can I get it to do the first if/then but ignore them both if A1 does not
= "y"?

I hope this is clear and there isn't too much repetition.

Thanks very much for your time and assistance

Ian


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default using IF function with AND/OR

One way:

=IF(A1<"Y",0,IF(AND(A1="y",B1="y"),F1*5%,F1*10%))



Ian R wrote:

Hi

I have successfully used the IF function on my worksheet so that if two
conditions are met it will do one calculation or another

However I'd like to know if its possible to get it to work with three
conditions e.g

if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just
ignore the calculation and enter a zero or a blank space.

I've got as far as nesting the first logical part which works e.g.

=IF(AND(A1="y",B1="y"),F1*5%,F1*10%)

But it falls over if A1 is anything other than "y".

How can I get it to do the first if/then but ignore them both if A1 does not
= "y"?

I hope this is clear and there isn't too much repetition.

Thanks very much for your time and assistance

Ian


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default using IF function with AND/OR

=IF(A1<"Y",0,IF(AND(A1="Y",B1="Y"),0.05,0.1)*F1)


"Ian R" wrote:

Hi

I have successfully used the IF function on my worksheet so that if two
conditions are met it will do one calculation or another

However I'd like to know if its possible to get it to work with three
conditions e.g

if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just
ignore the calculation and enter a zero or a blank space.

I've got as far as nesting the first logical part which works e.g.

=IF(AND(A1="y",B1="y"),F1*5%,F1*10%)

But it falls over if A1 is anything other than "y".

How can I get it to do the first if/then but ignore them both if A1 does not
= "y"?

I hope this is clear and there isn't too much repetition.

Thanks very much for your time and assistance

Ian



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default using IF function with AND/OR


"Ian R" wrote in message
...
Hi

I have successfully used the IF function on my worksheet so that if two
conditions are met it will do one calculation or another

However I'd like to know if its possible to get it to work with three
conditions e.g

if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just
ignore the calculation and enter a zero or a blank space.

I've got as far as nesting the first logical part which works e.g.

=IF(AND(A1="y",B1="y"),F1*5%,F1*10%)

But it falls over if A1 is anything other than "y".

How can I get it to do the first if/then but ignore them both if A1 does
not = "y"?

I hope this is clear and there isn't too much repetition.

Thanks very much for your time and assistance

Ian



Dave & Mama

Thanks guys - worked a treat!

I've been pulling my hair out on this one for ages.

I humbly bow in my appreciation to you Guru's!

Ian I^)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default using IF function with AND/OR

=IF(A1<"y",0,IF(B1="y",F1*5%,F1*10%))
[You don't need the AND(A1="y",B1="y"), because you don't get to the second
test unless A1="y".]
--
David Biddulph

"Ian R" wrote in message
...
Hi

I have successfully used the IF function on my worksheet so that if two
conditions are met it will do one calculation or another

However I'd like to know if its possible to get it to work with three
conditions e.g

if a1="y" AND b1="y" then f1*5% otherwise f1*10% but if a1<"y" then just
ignore the calculation and enter a zero or a blank space.

I've got as far as nesting the first logical part which works e.g.

=IF(AND(A1="y",B1="y"),F1*5%,F1*10%)

But it falls over if A1 is anything other than "y".

How can I get it to do the first if/then but ignore them both if A1 does
not = "y"?

I hope this is clear and there isn't too much repetition.

Thanks very much for your time and assistance

Ian



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
List of functions contained in the add-ins, esp. Analysis Toolpak Neil Goldwasser Excel Worksheet Functions 3 January 12th 07 12:43 PM
Fill Function to next Column shital shah Excel Worksheet Functions 0 August 16th 06 02:53 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM


All times are GMT +1. The time now is 06:12 AM.

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

About Us

"It's about Microsoft Excel"