Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dear All I am a VBA beginner, I will be very grateful if you can give me a VB script for the following situation, cheers! ================================================== ======= I have 2 worksheets, "Sheet1" and "Sheet2". Lets say, there are columns and 2 rows in Sheet 1 Sheet 1 Apple 6 4 (8) <------ new input If I input a new row (8) in Sheet 1, this can generate 3 new rows i Sheet 2. This logic is in accumulated basis. Sheet 2 Apple 6 6 6 4 4 4 (8) <------ new update (8) <------ new update (8) <------ new update ================================================== ======= I will apply your given VBA script onto an action button in Excel. I other words, data inputter need to press this button after each new ro has been added in Sheet 1. Many many thanks!!! Best Regards Kelvi -- KelvinVB ----------------------------------------------------------------------- KelvinVBA's Profile: http://www.excelforum.com/member.php...fo&userid=1629 View this thread: http://www.excelforum.com/showthread.php?threadid=27690 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is one way
Dim a As Variant a = ActiveCell.Value Sheets("Sheet2").Select Range("a1").Select Do Until ActiveCell = "" If ActiveCell.Value < "" Then ActiveCell.Offset (rowoffset:=1).Activate Loop For i = 1 To 3 ActiveCell = a ActiveCell.Offset(rowoffset:=1).Activate Next i Sheets("Sheet1").Select -----Original Message----- Dear All I am a VBA beginner, I will be very grateful if you can give me a VBA script for the following situation, cheers! ================================================= = ======= I have 2 worksheets, "Sheet1" and "Sheet2". Lets say, there are 1 columns and 2 rows in Sheet 1 Sheet 1 Apple 6 4 (8) <------ new input If I input a new row (8) in Sheet 1, this can generate 3 new rows in Sheet 2. This logic is in accumulated basis. Sheet 2 Apple 6 6 6 4 4 4 (8) <------ new update (8) <------ new update (8) <------ new update ================================================= = ======= I will apply your given VBA script onto an action button in Excel. In other words, data inputter need to press this button after each new row has been added in Sheet 1. Many many thanks!!! Best Regards Kelvin -- KelvinVBA ---------------------------------------------------------- -------------- KelvinVBA's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=16291 View this thread: http://www.excelforum.com/showthread...hreadid=276907 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple Consolidation of Worksheets | Excel Worksheet Functions | |||
Simple...Update Text Box in Chart | Charts and Charting in Excel | |||
Update another worksheets | Excel Worksheet Functions | |||
Simple Worksheets update | Excel Programming |