Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying data at specific positions


Hi,

I want to write a macro for copying perticular cell from worksheet1 to
worksheet2 at some specified position only.
for instance: My data will be there only in the row 2 of Worksheet 1. I
want to search which cells contains the value and copy that value in the
row 1 of the worksheet2, but at the same column position. i.e. data of
column a2 (Worksheet 1) will be copied at a1 position in worksheet 2.
b2(Worksheet 1) to b1(Worksheet 2). g2(Worksheet 1) to g1(Worksheet 2)
and so on... If any cell is blank then ignore that.

Thanks,
Sylvia


--
Sylvia
------------------------------------------------------------------------
Sylvia's Profile: http://www.excelforum.com/member.php...o&userid=30300
View this thread: http://www.excelforum.com/showthread...hreadid=502395

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Copying data at specific positions

Hi Sylvia,

I have cooked up:

Sub SylviasCopy()
Dim intLook As Integer
Dim intCol As Integer

intLook = 10

For intCol = 1 To 14
If Worksheets("Sheet1").Cells(2, intCol).Value = intLook Then
Worksheets("Sheet2").Cells(1, intCol).Value = intLook
' Exit For
End If
Next

End Sub

This will copy all valid values from sheet1 to sheet2
Top copy only the first valid value remove the character before Exit
For

Hoop this helps,

Executor

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
Copying Row Data to Specific Worksheet [email protected] Links and Linking in Excel 1 December 20th 06 07:04 AM
Copying charts and their data with relative cell positions Fodder937 Charts and Charting in Excel 0 August 25th 06 11:15 PM
copying specific data from 1 wrksht to another flrty Excel Worksheet Functions 1 February 1st 06 08:46 PM
Copying data to specific columns chalky Excel Programming 2 June 6th 05 01:05 PM
Macro Help - copying specific data Dave Excel Programming 1 April 22nd 05 07:08 AM


All times are GMT +1. The time now is 06:39 AM.

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"