Formula or VBA to increase a cell value based off another cell.

Flexi1

New Member
Joined
Feb 15, 2015
Messages
15
Hi

I need some help and I hope I am explaining this correctly, I have attached a photo of my spreadsheet and I need
to increase the value of column (M) so that each value has a minimum profit of 2.50

Column (M) is determined by column (I) so I need something that will adjust column (I) until the value
in column (M) reaches 2.50.

Any figures in column (M) that are above 2.50 need to be skipped as they are already good.

Basically I need the sale price in column (I) to increase so that the profit is a min of 2.50 on all items that currently fall below that amount, the full spreadsheet has 100,00 rows
( Column (I) and (M) have formulas already applied to get their totals, not sure if that matters)
 

Attachments

  • RALA SAMPLE SPREADSHEET.JPG
    RALA SAMPLE SPREADSHEET.JPG
    83.6 KB · Views: 20

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I think we need to see what the current formulas in there columns are!
Can you please post those?

It would be really helpful if you also posted the data in a format that we can copy and paste in Excel (not an image).
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
RALA SAMPLE SPREADHSEET 2.xlsx
ABCDEFGHIJKLM
1parent_skuskustock_statusregular_priceVAT DELIVERYPURCHASE PRICEADD MARKUPSALE PRICEREMOVE EBAY SPONSOR FEE REMOVE EBAY SALES FEEREMOVE VATTOTAL PROFIT
27620B7620BBLAC1112instock6.351.273.697.621219.622.9432.9433.9242.19
37620B7620BBLAC12instock6.351.273.697.621219.622.9432.9433.9242.19
47620B7620BBLAC34instock6.351.273.697.621219.622.9432.9433.9242.19
57620B7620BBLAC56instock6.351.273.697.621219.622.9432.9433.9242.19
67620B7620BBLAC78instock6.351.273.697.621219.622.9432.9433.9242.19
77620B7620BBLAC910instock6.351.273.697.621219.622.9432.9433.9242.19
87620B7620BBOTT1112instock6.351.273.697.621219.622.9432.9433.9242.19
97620B7620BBOTT12outofstock6.351.273.697.621219.622.9432.9433.9242.19
107620B7620BBOTT34instock6.351.273.697.621219.622.9432.9433.9242.19
RALA SAMPLE SPREADHSEET
Cell Formulas
RangeFormula
I2:I10I2=G2+H2
J2:J10J2=I2*0.15
K2:K10K2=I2*0.15
L2:L10L2=I2*0.2
M2:M10M2=I2-G2-J2-K2-L2
G2:G10G2=D2+E2
 
Upvote 0
Thank you for that.

Can you pick one of the rows, and walk us through the logic of how we are to increase column M to $2.50?
We need to know which columns we are allowed to increase/decrease in order to in order to get there, as there are different options.
 
Upvote 0
I need to increase the sale price (I) so that the total profit (M) shows as 2.50, all other rows will stay the same and only (i) can change

Obviously I would do this manually but there are 100,000 rows with different data in (I) for each one.

Any rows where (M) is already above 2.50 need to be left alone.
 
Upvote 0
I need to increase the sale price (I) so that the total profit (M) shows as 2.50, all other rows will stay the same and only (i) can change

Obviously I would do this manually but there are 100,000 rows with different data in (I) for each one.

Any rows where (M) is already above 2.50 need to be left alone.
But column I is not a hard-coded value. It is a formula, adding up columns G (Purchase Price) and H (Markup).

And column G (Purchase Price) is a formula adding up columns D (regular_price) and E (VAT).

So, I will ask you once again, which columns (and I should stress I mean hard-coded columns, not formula columns) are we allowed to change to increase your profit?
It looks like columns D, E, F and H are the only hard-coded columns.
 
Upvote 0
Sorry I see what has happened there, I was meant to remove the formula for that column when I created the spreadsheet to upload here, looks like I forgot. The figure in (I) isn't meant to have the formula in there.
 
Upvote 0
RALA SAMPLE SPREADHSEET 2.xlsx
ABCDEFGHIJKLM
1parent_skuskustock_statusregular_priceVAT DELIVERYPURCHASE PRICEADD MARKUPSALE PRICEREMOVE EBAY SPONSOR FEE REMOVE EBAY SALES FEEREMOVE VATTOTAL PROFIT
27620B7620BBLAC1112instock6.351.273.697.621219.622.9432.9433.9242.19
37620B7620BBLAC12instock6.351.273.697.621219.622.9432.9433.9242.19
47620B7620BBLAC34instock6.351.273.697.621219.622.9432.9433.9242.19
57620B7620BBLAC56instock6.351.273.697.621219.622.9432.9433.9242.19
67620B7620BBLAC78instock6.351.273.697.621219.622.9432.9433.9242.19
77620B7620BBLAC910instock6.351.273.697.621219.622.9432.9433.9242.19
87620B7620BBOTT1112instock6.351.273.697.621219.622.9432.9433.9242.19
97620B7620BBOTT12outofstock6.351.273.697.621219.622.9432.9433.9242.19
107620B7620BBOTT34instock6.351.273.697.621219.622.9432.9433.9242.19
RALA SAMPLE SPREADHSEET
Cell Formulas
RangeFormula
J2:J10J2=I2*0.15
K2:K10K2=I2*0.15
L2:L10L2=I2*0.2
M2:M10M2=I2-G2-J2-K2-L2
G2:G10G2=D2+E2
 
Upvote 0
My 2 cents, I would add some columns so you can have some flexibility on the Target Profit (My column O). If you are happy with the results in P, then you can copy that column and Paste Special - Values back into I. And I threw in some conditional formatting on the Profit column so you can see which ones fall below the target. This method lets you preview the changes that will be made before you replace the existing data.
(I had created the data and formulas from your first picture so my column headings are messed up. I changed data in G and H to test different results.)

Book1
ABCDEFGHIJKLMNOPQ
1priceprofitTarget ProfitUpdated Sale Price Updated Profit
27620B7620BBLAC1112instock6.351.273.697.621219.622.942.9433.9242.192.5019.932.50
37620Bqwertyinstock6.351.273.697.621320.622.942.9433.9243.1920.623.19
47620Basdfghinstock6.351.273.6981018.002.942.9433.9240.1920.312.50
Sheet1
Cell Formulas
RangeFormula
P2:P4P2=IF(M2<$O$2,($O$2-M2)+I2,I2)
Q2:Q4Q2=P2-L2-K2-J2-G2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M2:M4Expression=M2<$O$2textNO
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

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