If statement less than more than and margin

duck90

New Member
Joined
Jan 31, 2023
Messages
1
Office Version
  1. 2021
Platform
  1. MacOS
I've got a query that's too complex for me to solve...

I have a pricing matrix as follows and want a formula to automatically work out a price.

I have a cost price list such as:

£8, £12, £20, £36, £39, £55 etc.

£0-£5 we add 40p then x240%
£5-£8 we add 50p then x220%
£8-£10 we add 60p then x200%

This goes on but I can only get the first result working.

I want to be able to add a cost price in my cost column, and the sale price automatically result. Ie cost price £8.11, results in retail price being £26.13.

Any geniuses able to help me?
 

Attachments

  • Screenshot 2023-01-31 at 11.38.49.png
    Screenshot 2023-01-31 at 11.38.49.png
    90.7 KB · Views: 6

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I would be making the pricing table an actual Excel Table so that it automatially expands but try this.

Book7
BCDEFGHIJK
1Net CostRetailOriginal TextFromToAddPerCent
28.1126.13£0-£5 we add 40p then x240%050.4240%
37.4925.568£5-£8 we add 50p then x220%580.5220%
4£8-£10 we add 60p then x200%8100.6200%
Sheet1
Cell Formulas
RangeFormula
C2:C3C2=(B2+VLOOKUP(B2,$H$2:$K$4,3,TRUE))*(1+VLOOKUP(B2,$H$2:$K$4,4,TRUE))
 
Upvote 0
try this, the lookup table is arranged to desending order to work.

TT.xlsx
ABCDEF
18.1117.42991520%
211.994.158401420%
311.544.068351320%
412.664.292301220%
525.57.5251120%
633.759.35201020%
74512158.820%
8100.6200%
980.5220%
1050.4240%
Sheet4
Cell Formulas
RangeFormula
B1:B7B1=(A1+INDEX($D$1:$F$10,MATCH(A1*1.01,$D$1:$D$10,-1),2))*INDEX($D$1:$F$10,MATCH(A1*1.01,$D$1:$D$10,-1),3)


 
Upvote 0
your 20% for over 20m2 is a bit odd.
you can change that to what ever it should be, e.g. for 120%

TT.xlsx
ABCDEF
18.1117.429915120%
211.9924.9484014120%
311.5424.4083513120%
412.6625.7523012120%
525.5452511120%
633.7556.12010120%
74572158.8120%
8100.6200%
980.5220%
1050.4240%
Sheet4
Cell Formulas
RangeFormula
B1:B7B1=(A1+INDEX($D$1:$F$10,MATCH(A1*1.01,$D$1:$D$10,-1),2))*INDEX($D$1:$F$10,MATCH(A1*1.01,$D$1:$D$10,-1),3)
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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