how do I combine formulas..

Soap2022

New Member
Joined
Oct 1, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
How do I combine the following formulas?

=IF(OR(AND(B45="Coeur d'Alene",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),350,0)

=IF(OR(AND(B45="GREYBULL",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),1283,0)

=IF(OR(AND(B45="LAS VEGAS",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),543,0)

=IF(OR(AND(B45="EAST LANSING",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),500,0)

=IF(OR(AND(B45="MIAMI BEACH",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),609,0)

=IF(OR(AND(B45="VIRGINIA BEACH",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),629,0)

=IF(OR(AND(B45="CHEYENNE",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),541,0)

=IF(OR(AND(B45="PRINEVILLE",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),430,0)

=IF(OR(AND(B45="ALEXANDRIA",$B$7="Boise"),(AND(B45="Coeur d'Alene",$B$7="Twin Falls")),(AND(B45="Coeur d'Alene",$B$7="Pocatello")),(AND(B45="Coeur d'Alene",$B$7="Idaho Falls"))),643,0)
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
After looking at these, your logic doesn't quite make sense. You have 9 different outcomes for 3 of the 12 possible combinations.
Book1 10-1-2024.xlsm
ABCDEFGHIJK
1OR(ANDANDANDANDRESULT)
2Coeur d'AleneBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls350
3GreybullBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls1283
4Las VegasBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls543
5East LansingBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls500
6Miam BeachBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls609
7Virginia BeachBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls629
8CheyenneBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls541
9PrinevilleBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls430
10AlexandriaBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls643
Sheet2


If B45 = Coeur d'Alene and B7 = Twin Falls, how is it supposed to know which value to return?

Can you explain what your formula is supposed to do?
 
Upvote 0
After looking at these, your logic doesn't quite make sense. You have 9 different outcomes for 3 of the 12 possible combinations.
Book1 10-1-2024.xlsm
ABCDEFGHIJK
1OR(ANDANDANDANDRESULT)
2Coeur d'AleneBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls350
3GreybullBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls1283
4Las VegasBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls543
5East LansingBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls500
6Miam BeachBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls609
7Virginia BeachBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls629
8CheyenneBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls541
9PrinevilleBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls430
10AlexandriaBoiseCoeur d'AleneTwin FallsCoeur d'AlenePocatelloCoeur d'AleneIdaho Falls643
Sheet2


If B45 = Coeur d'Alene and B7 = Twin Falls, how is it supposed to know which value to return?

Can you explain what your formula is supposed to do?
1 location is where someone is and the other is where a meeting is held
 
Upvote 0
1 location is where someone is and the other is where a meeting is held
Well that didn't provide much more information. I assume these formulas do what you want them to by themselves?

If B45 = Coeur d'Alene and B7 = Twin Falls, how is it supposed to know which value to return? By your logic, it should return all of the values.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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