+ Reply to Thread
Results 1 to 3 of 3

If Range does not include necessary header

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    50

    Question If Range does not include necessary header

    I'd like to do two different things depending on whether or not a selected range starts with row 1 (row containing headers).

    More specifically I'd like to copy and past the selected range to a "new sheet" if it does not include the first row to a new sheet starting in A2, then go back to the data source sheet and grab the header from whichever column the range came from and place it in A1 on the "new sheet."

    This would allow me to run an automated pivot with the correct header no matter whether or not the user had selected the header with their range or not...feel free to recommend better ways of getting the proper header. I'm VERY rusty on VBA, thank you for any help/advice!

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: If Range does not include necessary header

    Did the response at http://www.mrexcel.com/forum/showthread.php?t=601462 work for you?

    Please read the link in my sig about cross posting.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    10-26-2011
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: If Range does not include necessary header

    Nope unfortunately it encountered a run time error and thank you for the write up on cross-posting. I have this thread going on mrexcel.com at the following http://www.mrexcel.com/forum/showthr...94#post3007994. It is also on ozgrid http://www.ozgrid.com/forum/showthre...405#post589405. Sorry about the cross post and thank you for any help anyone might be able to offer!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1