#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF AND question

Hi there,

I need a function that can provide one of three answers:

1 2 1 1...
3 3 4 4...
? ? ? ?...

If A1 = 1 and A2=3, answer 106; but if A1=1 and A2 = 4, answer 104; but if
A1=2, regardless of A2, answer 95.

The next function for column B is the same, except the answer is dependent
on the value delivered from the column A function. E.g. A3 + 6 or A3 +4 or
A3-5 etc.

Any help would be most appreciated.
--
*****
Many thanks
Gamq
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default IF AND question

Use the below formula for your first query.
=IF(A1="","",IF(A1=2,95,IF(AND(A1=1,A2=3),106,IF(A ND(A1=1,A2=4),104))))

I am not clear about your second query.

Remember to Click Yes, if this post helps!
--------------------
(Ms-Exl-Learner)
--------------------

"Gamq" wrote in message
...
Hi there,

I need a function that can provide one of three answers:

1 2 1 1...
3 3 4 4...
? ? ? ?...

If A1 = 1 and A2=3, answer 106; but if A1=1 and A2 = 4, answer 104; but if
A1=2, regardless of A2, answer 95.

The next function for column B is the same, except the answer is dependent
on the value delivered from the column A function. E.g. A3 + 6 or A3 +4 or
A3-5 etc.

Any help would be most appreciated.
--
*****
Many thanks
Gamq


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default IF AND question

Is this it?:

A3:

=IF(A1=2,95,IF(A1=1,IF(A2=3,106,IF(A2=4,104,"Unkno wn")),"Unknown"))

B3:

=IF(B1=2,A3-5,IF(B1=1,IF(B2=3,A3+6,IF(B2=4,A3+4,"Unknown")),"U nknown"))


If you'd prefer an error when when A1 or A2 contain unknown values, you can
use NA() instead of "Unknown". If you are happy to have 0 as an answer for
unknown values, these can be simplified:

A3:

=(A1=2)*95+(A1=1)*((A2=3)*106+(A2=4)*104)

B3:

=(B1=2)*(A3-5)+(B1=1)*((B2=3)*(A3+6)+(B2=4)*(A3+4))


HTH
Steve D.



"Gamq" wrote in message
...
Hi there,

I need a function that can provide one of three answers:

1 2 1 1...
3 3 4 4...
? ? ? ?...

If A1 = 1 and A2=3, answer 106; but if A1=1 and A2 = 4, answer 104; but if
A1=2, regardless of A2, answer 95.

The next function for column B is the same, except the answer is dependent
on the value delivered from the column A function. E.g. A3 + 6 or A3 +4 or
A3-5 etc.

Any help would be most appreciated.
--
*****
Many thanks
Gamq


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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
VBA Question Frank Rudd via OfficeKB.com Excel Discussion (Misc queries) 3 June 23rd 05 11:15 PM


All times are GMT +1. The time now is 09:39 PM.

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"