Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If formula 1

Status
Not open for further replies.

HRISUser

Technical User
Nov 29, 2005
14
US
I have an excel file with multiple worksheets and I am trying to have condition which returns different cells based on different criteria being met.


This is the formla that I am trying to use:

=IF(B6<='Pricing'!C3,'Pricing'!C5) (IF(AND(B6>'Pricing '!C3, B6<='Pricing'!D3),'Pricing'!D5))

I get #VALUE! as the result. I tried both sets of Ifs alone, and they worked. The problem is when I combine them I get the #VALUE! result. Was wondering if someone knew how to fix this.

Any help is greatly appreciated.
Thanks!
 
If I read your formula correctly, you need to remove the closing parenthesis at the end of the first IF and replace it with a comma: , . Your formula should look like this:

=IF(B6<='Pricing'!C3,'Pricing'!C5,IF(AND(B6<='Pricing'!C3,B10<='Pricing'!D3),'Pricing'!D5))

NOTE: the apostrophes surrounding the sheeet reference to Pricing (ie: 'Pricing') are stripped out when I use them in my workbook. Are you using local or global names?

Tom
 
' ' around sheet names is ther ein case there are any invalid characters such as spaces

Pricing!A1 doesn't need ' ' but
'Pricing Sheet'!A1 does

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi All,
Thanks so much for your quick responses Tom's formula worked like a charm!
-----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top