need a formula.

Gaggie

New Member
Joined
Feb 6, 2011
Messages
9
I have the following:

a1 = article number which will be typed in.
b1 = vlookup of description
c1 = quantity of article
d1 = price per article
e1 = c1 * d1


If they type in an article number but forget to type in the quantity and they type in a2 an other article.

I do not get a total price, price stays empty, because they haven't filled in the quantity.
But you cannot get back to the quantity cel c1, maybe because i've secured the sheet, except for input cells a1, a2, ... and c1,c2, .....

Does anybody has an idea how to ensure they've filled in a quantity.

With regards,

Gaggie
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Gaggie

Did you want it to just calculate the quantity as 1, when quantity is blank?

the only other way is to use vba code that i know of to ensure that the quantity field is filled.

Thanks
Tigs
 
Upvote 0
No validation does not work for this, because the value of the quantity depends if anything has been filled in a1, otherwise its no problem
 
Upvote 0
Could you set data validation on the row below to not allow data entry unless there is a value within the quantity column on the row above?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
For instance:<o:p></o:p>
<o:p></o:p>
A1 = 5, B1=Apple, C1=””, D1=””, E1=””<o:p></o:p>
A2 = *data validation error* as C1 is blank<o:p></o:p>
<o:p></o:p>
You could set the validation to something simple like Custom, with a formula ‘=IF(C1="",FALSE,TRUE)’<o:p></o:p>
 
Upvote 0
As i mentioned before the only way that i know of is to use VBA. Is this something that you are able to do.

Eg one way would be to use a Userform, and protect the whole sheet and only be able to enter new data in via the user form. This could definately force the user to enter data into all fields as required.
 
Upvote 0
i do not know how to attach a file on this forum.
i will have a look at creating a userform.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,696
Members
452,938
Latest member
babeneker

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