Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering 1 line of data values that will show up in a second Sheet?
Essentially. I am trying to enter 1 line of data on a worksheet. I the
want this data to reflect the corresponding journal entries Example: (1 line of data entry, First Worksheet) Quantity = 1 Unit Price = 100 Date = March 31, 2004 Second Worksheet: (What I am trying to Automate) Column 1: Quantity A1 = 1 A2 = 1 Column 2: Unit Price B1 = 100 B2 = -100 Column 3: Date C1 = 31-March-04 C2 = 31-March-04 Hi..has anyone done this before? I have tried countless times to make this work, admitedly I am new t using visual basic. But what I am trying to do seems so simple but.. I have a Column of data on my Main worksheet that I want to reflect i a Second worksheet but into two lines. Example: In my Master worksheet I have a column of price which A1 $100 When I enter this data I want it to appear in a second worksheet but i two rows, i.e. A1 through A2 It seems so simple but I can not get it to work. Anyone encounter this,? Any suggestions would be greatly appreciated. Even if you are unable to help I would like to express my appreciatio for all of you who lend your knowledge to all of us. Thank you in advance...Mat -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering 1 line of data values that will show up in a second Sheet?
iomighty
Here is somethig that might help. Sub copy_cells() Application.ScreenUpdating = False Dim rng As Range Dim i As Long Dim qty, price Dim mydate As Date Dim lastrow Set rng = Worksheets("sheet1").Cells(1, 1).CurrentRegion For i = 1 To rng.Rows.Count qty = rng(i, 1).Value price = rng(i, 2).Value mydate = rng(i, 3).Value Worksheets("sheet2").Activate lastrow = Range("a65536").End(xlUp).Offset(1, 0).Select With ActiveCell .Value = qty .Offset(1, 0).Value = qty .Offset(0, 1).Value = price .Offset(1, 1).Value = price .Offset(0, 2).Value = mydate .Offset(1, 2).Value = mydate End With Next i End Sub Charle -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
entering matching data for line charts | Charts and Charting in Excel | |||
One line of list show up in different sheet | Excel Worksheet Functions | |||
Show values from other sheet | Excel Worksheet Functions | |||
how can I start a new line when entering data into a word wrapped. | Excel Discussion (Misc queries) | |||
show if more than one line of data | Excel Worksheet Functions |