# Messy formula, Help Required

#### Excel_77

##### Active Member
Hi All,

I need a formula that can include several requirements and any help would be great.

If column A = AUD, I want to check column B for "Yes" and if this is the case I want the values in E and F added together.
If column A = AUD and column B = "No" I want to add the values in F and G together.

If column A = GBP or EUR, I want to check column B for a Yes and then return the values in H and I.
If column A = GBP or EUR, I want to check column B for a "No" and then return the values in H and J.

If column A = anything other than AUD, GBP and EUR, I want to check column B for a "Yes" and then return the values in E and F and then multiply this by the value in U.
If column A = anything other than AUD, GBP and EUR, I want to check column B for a "No"and then return the values in F and G then multiply this by the value in U.

### Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Are you going row by row? Like if A1="AUD", IF(B1="Yes"), E1+F1 .... etc etc and you're going to fill the formula down? Also in what column will this formula be?

Also, when you say "return the values in H and I" what exactly do you mean? Do you want to return those two values in the same cell? Should they be separated by a comma?

"Return the values in F and G then multiply this by" -- multiply what? F or G? Or should we add them together?

Are you going row by row? Like if A1="AUD", IF(B1="Yes"), E1+F1 .... etc etc and you're going to fill the formula down? Also in what column will this formula be?

Also, when you say "return the values in H and I" what exactly do you mean? Do you want to return those two values in the same cell? Should they be separated by a comma?

"Return the values in F and G then multiply this by" -- multiply what? F or G? Or should we add them together?

Yes it will be row by row.

H and I means to add the value of both cells.

Final formula will be in column X.

Last edited:
in X1
=IF(A1="AUD",F1+IF(B1="Yes",E1,G1),IF(OR(A1="GBP",A1="EUR"),H1+IF(B1="Yes",I1,J1),(F1+IF(B1="Yes",E1,G1))*U1))

in X1
=IF(A1="AUD",F1+IF(B1="Yes",E1,G1),IF(OR(A1="GBP",A1="EUR"),H1+IF(B1="Yes",I1,J1),(F1+IF(B1="Yes",E1,G1))*U1))

Brilliant, thanks so much.

Replies
8
Views
157
Replies
13
Views
278
Replies
3
Views
82
Replies
3
Views
66
Replies
1
Views
106

1,196,516
Messages
6,015,676
Members
441,915
Latest member
sm Hussaini

### 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.

### Which adblocker are you using?

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

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