Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i want to paste data in alternate cells. e.g. i have following 2 columns:
A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
so for ILB3, where would that go? you explanation would indicate 3 and 5 but
that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Oh..Pratick....
Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Main()
DIM Index as Long DIM rw as Long index = 1 DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub "Pawan" wrote: Oh..Pratick.... Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am not able to do this. It is giving run time error : 1004-Applicatio
defined or object defined error. Can u pls help me? -Pawan "Patrick Molloy" wrote: Sub Main() DIM Index as Long DIM rw as Long index = 1 DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub "Pawan" wrote: Oh..Pratick.... Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think Patrick forgot to initialize rw.
Sub Main() DIM Index as Long DIM rw as Long index = 1 rw = 1 '<-- Added DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub Pawan wrote: I am not able to do this. It is giving run time error : 1004-Applicatio defined or object defined error. Can u pls help me? -Pawan "Patrick Molloy" wrote: Sub Main() DIM Index as Long DIM rw as Long index = 1 DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub "Pawan" wrote: Oh..Pratick.... Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
oops !
thanks Dave "Dave Peterson" wrote in message ... I think Patrick forgot to initialize rw. Sub Main() DIM Index as Long DIM rw as Long index = 1 rw = 1 '<-- Added DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub Pawan wrote: I am not able to do this. It is giving run time error : 1004-Applicatio defined or object defined error. Can u pls help me? -Pawan "Patrick Molloy" wrote: Sub Main() DIM Index as Long DIM rw as Long index = 1 DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub "Pawan" wrote: Oh..Pratick.... Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan -- Dave Peterson |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are welcome, Sir!
Patrick Molloy wrote: oops ! thanks Dave "Dave Peterson" wrote in message ... I think Patrick forgot to initialize rw. Sub Main() DIM Index as Long DIM rw as Long index = 1 rw = 1 '<-- Added DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub Pawan wrote: I am not able to do this. It is giving run time error : 1004-Applicatio defined or object defined error. Can u pls help me? -Pawan "Patrick Molloy" wrote: Sub Main() DIM Index as Long DIM rw as Long index = 1 DO Until Cells(rw,1) = "" index =index +1 Cells(index,2) = Cells(rw,1) index = index + 2 Cells(index,2) = Cells(rw,1) rw=rw+1 LOOP End Sub "Pawan" wrote: Oh..Pratick.... Unknowingly I wrote in wrong way... corrected question is here... i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 4 and 6 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan "Patrick Molloy" wrote: so for ILB3, where would that go? you explanation would indicate 3 and 5 but that would over-write PWV3. "Pawan" wrote: i want to paste data in alternate cells. e.g. i have following 2 columns: A B PWV3 DIGOUTHG ILA3 DIGOUTHG ILB3 DIGOUTHG PDE3 DIGOUTHG ILC3 DIGOUTHG QWR3 DIGOUTHG PWV4 DIGOUTHG ILA4 DIGOUTHG I want to paste PWV3 in row 1 and 3 of column B. Then I want to paste ILA3 in row 2 and 4 of column B...and so on....it is tedious to do it for large numner of rows. Can we write macro for this... thank you... -Pawan -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sum of Alternate Cells | Excel Discussion (Misc queries) | |||
Automatic data entry in alternate cells based on drop-down menu se | Excel Worksheet Functions | |||
macro copy/paste data from multiple cells to multiple cells | Excel Discussion (Misc queries) | |||
Using a Macro to paste into Blank Cells | Excel Worksheet Functions | |||
Hyperlink-Pawan | New Users to Excel |