Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default macro to paste data in alternate cells-pawan

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default macro to paste data in alternate cells-pawan

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
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
Sum of Alternate Cells Kamal Singh Oberh[_2_] Excel Discussion (Misc queries) 4 June 1st 08 07:46 PM
Automatic data entry in alternate cells based on drop-down menu se silence13 Excel Worksheet Functions 3 March 23rd 07 03:15 AM
macro copy/paste data from multiple cells to multiple cells Diana Excel Discussion (Misc queries) 0 July 10th 06 09:24 PM
Using a Macro to paste into Blank Cells phillipsb Excel Worksheet Functions 0 October 5th 05 05:58 PM
Hyperlink-Pawan Pawan New Users to Excel 2 August 4th 05 07:14 AM


All times are GMT +1. The time now is 12:18 PM.

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"