Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
entering matching data for line charts johnston Charts and Charting in Excel 6 September 30th 08 10:52 PM
One line of list show up in different sheet liseladele Excel Worksheet Functions 5 November 17th 05 07:24 AM
Show values from other sheet TONY Excel Worksheet Functions 0 August 31st 05 03:03 PM
how can I start a new line when entering data into a word wrapped. spozzie Excel Discussion (Misc queries) 2 March 31st 05 05:51 AM
show if more than one line of data jenn Excel Worksheet Functions 1 December 20th 04 11:45 PM


All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"