Conditional Formula

ultracyclist

Active Member
Joined
Oct 6, 2010
Messages
271
Office Version
  1. 365
Platform
  1. Windows
I want to create a formula that I can carry down from rows F2:F83 on Sheet1 that has the following logic

IF C2:C83 = MS355 in Sheet1, multiply the quantity in E2:E83 (Sheet1) times the cost from sheet2 cell B4 = 450
IF C2:C83 = MS390 in Sheet1, multiply the quantity in E2:E83 (Sheet1) times the cost from sheet2 cell B7 = 700

Ex: C2 has MS355 in Sheet 1 and the quantity in E2 =12. The value returned in F2 should =$5400
C2 has MS390 in Sheet 1 and the quantity in E2 =20. The value returned in F2 should =$14000

Not sure where to start with this one. Any help would be appreciated

Thanks
Tom
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Is MS355 cell address or text string?
May be:
1) text string:
F2:
=((C2="MS355")*sheet2!$B$4+(C2="MS390")*sheet2!$B$7)*E2

2) address
=((C2=$MS$355)*sheet2!$B$4+(C2=$MS$390)*sheet2!$B$7)*E2

Drag F2 down
 
Upvote 0
Is MS355 cell address or text string?
May be:
1) text string:
F2:
=((C2="MS355")*sheet2!$B$4+(C2="MS390")*sheet2!$B$7)*E2

2) address
=((C2=$MS$355)*sheet2!$B$4+(C2=$MS$390)*sheet2!$B$7)*E2

Drag F2 down
MS355 and MS390 are text string.

To clarify the quantities are also in Sheet1 in cells E2:E83. The formula shows *sheet2
 
Upvote 0
Does this work?
=IFS(C2="MS355",E2*Sheet2!$B$4,C2="MS390",E2*Sheet2!$B$7)
 
Upvote 0
With G1 = 2018
(could be formatted as 0000" pmnt"
Try:
Book1
ABCDEFGHIJKLMNOPQRS
1COMPDESCRIPTION (YR / MAKE / MODEL)FINANCING Mthly Lease Payment Lease StartLease End2018201920202021202220232024202520262027202820292030
2QH1 Titan5 Utility Box 10' x 12' L C/W Stacker & AccessoriesAdd Capital799.6801-Sep-201901-Aug-20240.003,198.729,596.169,596.169,596.169,596.166,397.440.000.000.000.000.000.00
3QHGravel Screener Add Capital2145.9201-Apr-202101-Mar-20270.000.000.0019,313.2825,751.0425,751.0425,751.0425,751.0425,751.046,437.760.000.000.00
4KELJD - 2012 624K LoaderCWB2737.2301-May-201901-Apr-20260.0021,897.8432,846.7632,846.7632,846.7632,846.7632,846.7632,846.7610,948.920.000.000.000.00
5AMP2005 JD 8120 Brandt Finance1787.5201-May-202130-Apr-20270.000.000.0014,300.1621,450.2421,450.2421,450.2421,450.2421,450.247,150.080.000.000.00
6KEL2008 John Deere 750J Crawler DozerBrandt Finance4934.5924-Jun-202024-May-20240.000.0034,542.1359,215.0859,215.0859,215.0824,672.950.000.000.000.000.000.00
7WLSJD - 2018 250G ExcavatorJohn Deere4645.6131-Oct-201830-Sep-202413,936.8355,747.3255,747.3255,747.3255,747.3255,747.3241,810.490.000.000.000.000.000.00
8WFP332G SkidsteerJohn Deere1419.8428-Oct-201928-Sep-20240.004,259.5217,038.0817,038.0817,038.0817,038.0812,778.560.000.000.000.000.000.00
9WLS2018 John Deere 380GLC Excavator BaseBrandt Finance5140.8401-Sep-202001-Aug-20260.000.0020,563.3661,690.0861,690.0861,690.0861,690.0861,690.0841,126.720.000.000.000.00
Sheet1
Cell Formulas
RangeFormula
H1:S1H1=G1+1
G2:S9G2=$D2*((YEAR($E2)=G$1)*(12-MONTH($E2)+1)+(YEAR($F2)=G$1)*MONTH($F2)+AND(G$1>YEAR($E2),G$1<YEAR($F2))*12)
 
Upvote 0
Let me give this formula a try in the next hour or sooner and I will reply back to this thread.
Is there a scenario where C2:C83 is neither MS355 or MS390 ? if that's the case you would need a formula that took that into account, so the 1st IF formula would leave it Blank, alternatively change the 2nd option would multiply by whatever you state

=IF(C2="MS355",E2*Sheet2!$B$4,IF(C2="MS390",E2*Sheet2!$B$7,""))
=IF(C2="MS355",E2*Sheet2!$B$4,IF(C2="MS390",E2*Sheet2!$B$7,E2*Sheet2!$B$4))
 
Upvote 0
Solution
Is MS355 cell address or text string?
May be:
1) text string:
F2:
=((C2="MS355")*sheet2!$B$4+(C2="MS390")*sheet2!$B$7)*E2

2) address
=((C2=$MS$355)*sheet2!$B$4+(C2=$MS$390)*sheet2!$B$7)*E2

Drag F2 down
Thank you for your help. This got me started.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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