Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"