View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alan L. Wagoner Alan L. Wagoner is offline
external usenet poster
 
Posts: 13
Default VBA and multiple sheets

I apologize for the newbie question, but I'm new to VBA/Excel and need some
advice. Let me give a simple description of what I would like to do.

The workbook would consist of 3 sheets. The first sheet would be the "data
entry" sheet, with Sheets 2 and 3 being generated by some VBA code. This is
done to minimize any data entry/user error.

As an example, let's say the user enters in three pieces of information on
the first sheet. He/she enters the name of a fruit or vegetable, then the
category that it belongs in "fruit" or "vegetable", and finally the price.

Example:
apple fruit .50
potato vegetable .24
banana fruit .55
corn vegetable .28

The user would (ideally) click a button on the page, or run the VBA code
which would iterate through all of the entries in sheet one. If it's a
fruit, it would copy the entire row to Sheet 2. If it was a vegetable, it
would copy the entire row to Sheet 3.

After the code was run, Sheet 2 would look like:

apple fruit .50
banana fruit .55

And Sheet 3 would be:

potato vegetable .24
corn vegetable .28

The downside is that Sheets 2 and 3 have to be recalculated every time, but
since there won't be a lot of data, it's OK. Any assistance or ideas would
be appreciated.

Thanks in advance,

Alan