Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
is this possible?
Could someone please help me or tell me if I can do the following. I have this in a worksheet Column A (name of item) Fiesta 9 oz Fiesta 4 oz Fiesta 3 oz Fiesta 1.5 oz Column B (number of mixes scheduled of item) 6 5 4 10 Say in column B5 I have a total = it is the sum of A1:A4 which would be equal to 25 in this example I want to create a userform that asks the user to input how many cases were made in total. If the user says 25, then I want it to delete all the number of mixes in A1:A4 and not do anything with the total field. However this is my dilema, if the user puts in 24 tubs made, I would like it to go through and erase all the tubs in A1:A4 and put the 1 (remaining number) in any of the cells (A1:A4). The only problem is that I have hundreds of mixes so I can't just say put in A4. I know how to do the code for everything except for leaving the remaining mixes. If anybody could help or give me some better ideas, or logic in going about this, I would be extremely greatful. Thanks Josh -- jhahes ------------------------------------------------------------------------ jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596 View this thread: http://www.excelforum.com/showthread...hreadid=390759 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
is this possible?
OK, let's start with the logic. If the user enters a different number than is the total then you wan Excel to do something - that's easy enough. The question is, what do you want Excel to do? If the variable relates to the number or size of tubs, then you coul use Vlookup. EG if the difference between the total and what the user entered i one(as in your example) you could have a table that says 1= Fiesta 9oz 2= Fiesta 9oz + Fiesta 4oz and so on. Or did I miss the point by a mile?! Coli -- Colin Vicar ----------------------------------------------------------------------- Colin Vicary's Profile: http://www.excelforum.com/member.php...fo&userid=1047 View this thread: http://www.excelforum.com/showthread.php?threadid=39075 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|