IF Function, if true then leave the cell unchanged

loststudent

New Member
Joined
Jan 25, 2018
Messages
7
Hi everyone!

I'm making a company's stock application in VBA.

I have a userform that adds orders details (including unit prices) to a sheet and I want the unit price added to be updated on another sheet (with the current stock). The updated cell would have the value added through the userform, but only if there is an order entry regarding it. Otherwise, the value should remain the same.

I tried using IFSUM, so that if it can find the product in the range of unit prices on the other sheet, the cell would be updated. But I need a value_if_false that would make no change to the cell and, as I found out, there is no way to do that with formulas (correct me if I'm wrong).

I don't know how to do this with VBA either, so some code would be very appreciated (instructions needed too, I'm not a complete beginner, but not a pro either).

Thank you! :)
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Your already using VBA if your using a userform. If your entering it to 1 sheet, just enter it to the 2nd sheet at the same time. Your wrong. The whole purpose of an If statement is to manage the possibility of a false condition ie. If(Some condition, do this when condition correct, do this when condition is incorrect). If you want help U need to specify where your data is (specify column and row), what needs to happen to it and where you want the output (specify column and row). HTH. Dave
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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