Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default put data in a column into a row


Hi,

I have a worksheet with a lot of data in column B (rows 12 to 242) and
a column J (also rows 12 to 242) where the user can insert numbers.
I would like to create a copy function to copy the vertical data in
column B only when there is a number in column J to a new sheet and put
the vertical data from column B into a horizontal row 12 on this new
sheet.
I only don't know how to do this. Can someone help me? Thanks in
advance!


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=564633

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default put data in a column into a row

Sub TransposeData()
Dim icol as Long, rng as Range
Dim cell as Range
icol = 1
set rng = Columns(10).specialcells(xlConstants,xlNumbers)
for each cell in rng
Worksheets("Sheet2").Cells(12,icol).Value = cell.offset(0,-1).Value
icol = icol + 1
Next
end sub

--
Regards,
Tom Ogilvy


"leonidas" wrote:


Hi,

I have a worksheet with a lot of data in column B (rows 12 to 242) and
a column J (also rows 12 to 242) where the user can insert numbers.
I would like to create a copy function to copy the vertical data in
column B only when there is a number in column J to a new sheet and put
the vertical data from column B into a horizontal row 12 on this new
sheet.
I only don't know how to do this. Can someone help me? Thanks in
advance!


--
leonidas
------------------------------------------------------------------------
leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=564633


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
How do I sort data in column B to align with data in column A? Jephri1 New Users to Excel 1 April 18th 08 05:05 AM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
counting data in one column and match with data in another column jenny Excel Discussion (Misc queries) 1 October 26th 06 09:16 PM
Matching one column against another column of data to show the same amount of data. dodat Excel Worksheet Functions 0 December 30th 05 06:19 PM
find data in one column and use data in the next column over Exce charles Excel Programming 2 May 6th 05 01:54 PM


All times are GMT +1. The time now is 07:11 PM.

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"