LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems in Visual Basic Editior, In search of a command

Overview of what I have done:

Using VB Editor I wrote instructions for copying data entries from m
primary worksheet to move my second sheet in my desired format. i.e
it is not an exact duplicate of my first worksheet.

* Basically 1 line of data being entered in my first sheet is copie
into four lines on my second sheet.


The Problem:

I am trying to write a command that will recognize the instructions
wrote as variable so I can make this format repeat as I continue t
make entries in my first worksheet over time.

I know that the command will have to recognize that the instructions
wrote will act in increments of four and I have tinkered with command
but have been unsuccessful. Any suggestions or tips would be ver
gratefully appreciated.

Below is a sample of the commands I wrote. The data from Sheet 1 is
single row of inputs that copy into four lines on the second sheet as
want them.

Sub Duplicate1()

Range("L2").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-0]C"
Range("L3").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-1]C"
Range("L4").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-2]C"
Range("L5").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-3]C"
Range("L5").Select

Range("M2").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-0]C"
Range("M3").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-1]C"
Range("M4").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-2]C"
Range("M5").Select
ActiveCell.FormulaR1C1 = "=Entry!R[-3]C"
Range("M5").Select


End

For Example: On Sheet 1:

L = Quantity, and will copy to L on Sheet 2 but into four rows
M = Price, and will copy to M on Sheet 2 but into four rows


Matt S

--
Message posted from http://www.ExcelForum.com

 
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
problems with excel and visual basic for applications Edward Letendre Excel Discussion (Misc queries) 0 September 24th 09 11:03 PM
Help me please understand this Visual Basic command Steve Excel Discussion (Misc queries) 1 September 16th 08 06:14 PM
Visual basic editior Stan Halls Excel Worksheet Functions 3 September 14th 07 12:24 PM
VISUAL BASIC COMMAND TO MOVE CURSER DOWN ONE CELL Moving Problem! Excel Worksheet Functions 2 December 19th 06 08:00 AM
visual basic command in a cell?? konky Excel Programming 1 August 26th 03 06:33 PM


All times are GMT +1. The time now is 09:21 AM.

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

About Us

"It's about Microsoft Excel"