If cell contain "xy" multiply by

carrriee90

New Member
Joined
Oct 23, 2012
Messages
2
Hello everyone, I really need help with a formula!

Invoiced byCompanyAmount

<tbody>
[TD="width: 107"]Lead[/TD]
[TD="width: 114"]To XY[/TD]
[TD="width: 141"]To AB[/TD]

[TD="class: xl63"]XY[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]600[/TD]
[TD="class: xl63"]XY[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AB[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]2560[/TD]
[TD="class: xl63"]AB[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]XY[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]1000[/TD]
[TD="class: xl63"]AB[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

[TD="class: xl63"]AB[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"]1500[/TD]
[TD="class: xl63"]XY[/TD]
[TD="class: xl63"][/TD]
[TD="class: xl63"][/TD]

</tbody>

I need to create a formula whch says that
  • if money is invoiced by XY and is is the lead of XY the amount must be multiplied by 0.2 in column To AB
  • if money is invoiced by AB and is the lead of AB the amount must be multiplied by 0.2 in column TO XY
  • if money is invoiced by XY and the lead of AB the amount must be multiplied by 0.3 in column To AB
  • if money is invoiced by AB and the lead of XY the amount must be multiplied by 0.3 in column To XY

Is it possible to put this in one function?

Thanks in advance!!!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi,
let Your Data be in A1:F5, in Column E (with the Text To XY) I propose a Formula:
Code:
=IF((RIGHT($E$1,2)<>A2)*(RIGHT($E$1,2)<>D2),0,2*C2,IF((RIGHT($E$1,2)<>A2)*(RIGHT($E$1,2)=D2),0,3*C2,""))
Try to create a suitable Formula in Column F, this is Your HomeWork, best regards.
 
Upvote 0
Welcome to MrExcel.

Here is a single formula solution:

=IF(AND($A2="XY",RIGHT(E$1,2)="AB"),$C2*IF($D2="XY",0.2,0.3),IF(AND($A2="AB",RIGHT(E$1,2)="XY"),$C2*IF($D2="AB",0.2,0.3),""))
 
Upvote 0
Try this in E2, Drag Across to F2 then Down

Excel Workbook
ABCDEF
1Invoiced byCompanyAmountLeadTo XYTo AB
2XY600XY180
3AB2560AB512
4XY1000AB200
5AB1500XY450
Sheet1
 
Last edited:
Upvote 0
Thanks for the answers but I keep on getting a message that the formulas contain errors. No idea what i am doing wrong!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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