Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have had some trouble on a project I have been working on for
some time. I have tried numerous approaches, each with undesired results. (VAB Code) The project I am working on has become quite complex, so rather than bother you with my spaghetti code, I have made a simple example of what I am trying to do. http://www.geocities.com/rockytophubby\sample.html The sheet tracks People and how many fruits they had each day. Day1 is where the information is Inputted, Day2 will double the DAY1 numbers, and Day three will triple the DAY2 Numbers. The challenge I am faced with: On DAY1 every time ANY information is inputted (even if there is no name) have a new Row AUTO inserted for the next person on ALL three days. (Keeping in mind each day has different formulas, so the Formatting and Formulas must be copied from the line above it on each sheet.) ANY help I can get here would be greatly appreciated, as I know this is no task for a beginner... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peter
based on your simple example here's some code (which could probably be cleaned up a bit but i've left it rather longwinded in case you need to edit it) which when assigned to a button on the form adds the new lines to each sheet then prompts for the name & number of each type of fruit for the starting day. You could name the worksheet button "ADD NEW PERSON" or similar Sub AddNewRecord() Rows("3:5").Select Selection.Copy ActiveCell.SpecialCells(xlLastCell).Select ActiveCell.Offset(1, 0).Select Selection.End(xlToLeft).Select Sheets(Array("Day1", "Day2", "Day3")).Select Sheets("Day1").Activate ActiveSheet.Paste Selection.End(xlToLeft).Select ActiveCell.Offset(2, 1).Select ActiveCell.Value = InputBox("Enter name", "Enter name") Sheets("Day2").Select Sheets("Day1").Select ActiveCell.Offset(0, 1) = InputBox("Enter number of apples.", "Apples") ActiveCell.Offset(0, 2) = InputBox("Enter number of oranges.", "Oranges") ActiveCell.Offset(0, 3) = InputBox("Enter number of grapes.", "Grapes") Application.CutCopyMode = False End Sub Please post back if you need assistance getting the code in the right place or linked to the button or talking about something other than fruit! Hope this helps Cheers JulieD "Peter Long" wrote in message ... I have had some trouble on a project I have been working on for some time. I have tried numerous approaches, each with undesired results. (VAB Code) The project I am working on has become quite complex, so rather than bother you with my spaghetti code, I have made a simple example of what I am trying to do. http://www.geocities.com/rockytophubby\sample.html The sheet tracks People and how many fruits they had each day. Day1 is where the information is Inputted, Day2 will double the DAY1 numbers, and Day three will triple the DAY2 Numbers. The challenge I am faced with: On DAY1 every time ANY information is inputted (even if there is no name) have a new Row AUTO inserted for the next person on ALL three days. (Keeping in mind each day has different formulas, so the Formatting and Formulas must be copied from the line above it on each sheet.) ANY help I can get here would be greatly appreciated, as I know this is no task for a beginner... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Desperately seeking ACTIVE.WORKBOOK function for XLM | Excel Worksheet Functions | |||
Desperately Need Help | Excel Discussion (Misc queries) | |||
Desperately need help | Excel Worksheet Functions | |||
Desperately in need of some help | New Users to Excel | |||
Desperately Seeking Offset Formula!! | Excel Discussion (Misc queries) |