Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Copy Cell from one sheet to specific Col value

Hello,

Need help in a VBA format.
Sheet2 has a column of 15 rows, random numbers. i.e.H2 to H16

I need to sort these cells on Sheet1 with column headings 1 to 49
starting at row A25 going down again 15 rows A39

Therefore,that I may visually see a pattern of these 15 numbers.

With Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Copy Cell from one sheet to specific Col value

Record a macro when you:
Edit|Copy H2:H16 of sheet2
Edit|Pastespecial|Transpose onto A25 of sheet1
and continue to record when you sort A25:A39

And you'll have code that works ok.

But if you need help tweaking your recorded code, post back with what you have.
I'm sure you'll get help.

smandula wrote:

Hello,

Need help in a VBA format.
Sheet2 has a column of 15 rows, random numbers. i.e.H2 to H16

I need to sort these cells on Sheet1 with column headings 1 to 49
starting at row A25 going down again 15 rows A39

Therefore,that I may visually see a pattern of these 15 numbers.

With Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Copy Cell from one sheet to specific Col value

The Code listed below works on the same sheet.
I want the data Column to be on Sheet2
Stratified into the appropriate on sheet starting at row A25
'-----------------------------------------------------------
Sub RandomNumber()
Dim cell As Range
Dim lRow As Long
Dim lColumn As Long
Application.ScreenUpdating = False
For Each cell In _
Range("H2:H" & _
Range("H65536").End(xlUp).Row)
lRow = cell.Row
lColumn = cell.Value
Cells(lRow, lColumn) = cell.Value
Next 'cell
Application.ScreenUpdating = True
End Sub
'------------------------------------------------------------------

If possible change H65536 to H16

With Thanks
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
copy rows to new sheet based on specific cell value dlballard Excel Worksheet Functions 5 April 24th 23 11:44 AM
copy specific rows to a new sheet kim Excel Programming 14 April 30th 07 05:03 PM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM
how to copy a sheet to a specific workbook lm Excel Discussion (Misc queries) 1 October 14th 05 06:56 PM
Need Macro to copy specific sheet mac Excel Worksheet Functions 1 January 17th 05 08:46 PM


All times are GMT +1. The time now is 06:56 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"