Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default creating list of column headers

Hi

I'm trying to create a list of column headers for an enormous
spreadsheet, and I was wondering if there was an easy way to do this
without cutting each header individually and pasting it into a single
column.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default creating list of column headers

You could just select the row where all the headers are and Copy them.
Instead of paste, use EditPaste Special and then select Transpose.

"rfhurley" wrote:

Hi

I'm trying to create a list of column headers for an enormous
spreadsheet, and I was wondering if there was an easy way to do this
without cutting each header individually and pasting it into a single
column.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default creating list of column headers

Hi rfhurley,

rfhurley wrote:
I'm trying to create a list of column headers for an enormous
spreadsheet, and I was wondering if there was an easy way to do this
without cutting each header individually and pasting it into a single
column.


I don't know if I understand exactly what you want to do. But here's some
code that will take the first row (assuming those are your headers) and put
them in a list in one column starting at A2 on the same sheet. This could
be adapted easily to place the list on a different sheet if you want.

Sub test()
Dim nLastCol As Integer

With ActiveSheet
nLastCol = .Cells(1, .Columns.Count).End( _
xlToLeft).Column
.Range(.Cells(1, 1), .Cells(1, nLastCol)).Copy
.Range("A2").PasteSpecial Paste:=xlPasteValues, _
Transpose:=True
End With
End Sub

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default creating list of column headers

Thank you, Mike. It worked like a charm.


Mike Jerakis wrote:
You could just select the row where all the headers are and Copy them.
Instead of paste, use EditPaste Special and then select Transpose.

"rfhurley" wrote:

Hi

I'm trying to create a list of column headers for an enormous
spreadsheet, and I was wondering if there was an easy way to do this
without cutting each header individually and pasting it into a single
column.



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
creating a pick list from more than one column subroc Excel Discussion (Misc queries) 2 June 27th 09 01:21 PM
Creating a dropdown list within a column dsebiz Excel Discussion (Misc queries) 4 March 19th 08 05:56 PM
Excel column headers to a vertical list Steve F Excel Discussion (Misc queries) 0 April 27th 05 11:43 PM
Excel column headers to a vertical list Carole O Excel Discussion (Misc queries) 1 April 27th 05 11:01 PM
Multi-column list box with headers question... Thurman Excel Programming 6 September 23rd 03 03:59 AM


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