Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - multiple worksheets

Status
Not open for further replies.

DBAchick

Programmer
Apr 27, 2000
61
I am beyond frustration. This should be easy and I am making it difficult...

I have 9 worksheets in my excel workbook.

I want to enter data in sheet1 and based on the value in a column, I want the entire row to be updated and/or added to one of the other 8 worksheets.

Example:

Sheet 1 has food entries on it.

Column A has the category of food (Meat, Dessert or Veg)
Column B has the calorie count of the food
Column C has the description of the food

If Row 1 Column A is added and has "Meat" in it, copy all of Row 1 to the first empty row in worksheet Meat.

Likewise, if Row 1 Column C is changed to "Hotdog", update the corresponding Row on the "Meat" sheet.

In a perfect world, it would be great if Column A was changed fron "Meat" to "Veg", the row on the Meat worksheet would be deleted and a new row would be added to the Veg worksheet.

I have used Worksheet_change to try and write the row out to another sheet. It works if I hard code all the variables, but even standing on my head does not help if I try to make the code dynamic.

I hope there is an Excel guru out there......

Thanks!


[sig][/sig]
 
Coding what you want is not a problem. The problem is the variables like all the ways to say meat (hotdog, roast, rat, road kill, etc.).

You need to have a list of all the possible names for meat, veggies, fruit, bread, and whatever else to determine the category and thus the sheet. Once you have that you can look on the sheet to see if the item is already there and replace it or not there and add it.

Flow charting this would make it a lot easier. Once you have the flow chart and have problems with a particular part of the coding you can ask a question on that section.


[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top