IF, AND, OR Combined Statement

yvettew78

New Member
Joined
Aug 23, 2020
Messages
34
Platform
  1. Windows
  2. Web
Hi Everyone

I am trying to work out a formula like the following but it's nor working. What am I doing wrong? If someone can help, that would be great.

Basically CELL E4 (as highlighted below) need to be and OR statement, but I am not sure how to show it.

Thank you.

=IF(AND(E3="Cash",E4="Residential-House",E4="Residential-Shed",E5="Single"),VLOOKUP(C10,'RRP Pricing'!A2:G58,2,FALSE),IF(AND(E3="Cash",E4="Residential-House",E4="Residential-Shed",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,3,FALSE),IF(AND(E3="Cash",E4="Commercial",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,4,FALSE),IF(AND(E3="Finance",E4="Residential-House",E4="Residential-Shed",E5="Single"),VLOOKUP(C10,'RRP Pricing'!A2:G58,5,FALSE),IF(AND(E3="Finance",E4="Residential-House",E4="Residential-Shed",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,6,FALSE),IF(AND(E3="Finance",E4="Commercial",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,7,FALSE),0))))))
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
rather than working an OR in there, how about changing your bold selection for

,LEFT(E4,10)="Residential" therefore you ignore House and shed and shorthen the formula a little
 
Upvote 0
Hey There. thanks for replying to me.

is this correct??
=IF(AND(E3="Cash",LEFT(E4,10)="Residential",E5="Single"),VLOOKUP(C10,'RRP Pricing'!A2:G58,2,FALSE),IF(AND(E3="Cash",LEFT(E4,10)="Residential",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,3,FALSE),IF(AND(E3="Cash",E4="Commercial",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,4,FALSE),IF(AND(E3="Finance",LEFT(E4,10)="Residential",E5="Single"),VLOOKUP(C10,'RRP Pricing'!A2:G58,5,FALSE),IF(AND(E3="Finance",,LEFT(E4,10)="Residential",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,6,FALSE),IF(AND(E3="Finance",E4="Commercial",E5="Three"),VLOOKUP(C10,'RRP Pricing'!A2:G58,7,FALSE),0))))))

it doesnt seem to work?
 
Upvote 0
it might be residential is 11 letters long, in which case change 10 to 11, not always easy to count on screen

you have also created a double comma Finance",,LEFT(E
 
Upvote 0
Thanks heaps - sorry I wasn't sure what the "10" represented. I was just about to ask you......that worked.

Really appreciate your help!

Perhaps you could help me with an issue I have just come across...........I have created a RESET button and script to reset all fields of the calculator I am creating. But the user can click the PLUS sign to add a new row when they need to add a new item. This works but when I RESET the calculator the new rows that were added are still there and some of the cell references in the RESET script are incorrect. How can I fix this? Should I add a function so that it removed the rows the user has added? If so, what function would be needed?

Thanks again for your help.
 
Upvote 0
@yvettew78 that is totally a new question, and should be a new topic. I can't imagine what any of that looks like
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top