+ Reply to Thread
Results 1 to 5 of 5

Macro for populating header with cell value

  1. #1
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Macro for populating header with cell value

    Hello. Since headers cannot be linked to cells in a spreadsheet, I decided to try my hand at writing a macro to do this. This is what I have so far, but I keep getting the error message "Run-time error '1004': Application-defined or object-defined error"

    Please Login or Register  to view this content.
    This is my first macro ever, so I'm having difficulty seeing where I am going wrong. Any tips?

    Thanks for your help!
    Last edited by Kabouterke; 10-13-2016 at 09:24 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Macro for populating header with cell value

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-21-2015
    Location
    Brussels, Belgium
    MS-Off Ver
    2013
    Posts
    33

    Re: Macro for populating header with cell value

    Thank you very much! Excellent help.
    Last edited by Kabouterke; 10-13-2016 at 08:04 AM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Macro for populating header with cell value

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Macro for populating header with cell value

    Forum induced duplicate post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. macro to lock cell by column header based on value in another cell by column header
    By Closet Guru in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2015, 12:36 PM
  2. Populating a cell with a column header name
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-27-2015, 02:53 AM
  3. Populating a cell with a column header
    By Patty McJorst in forum Excel General
    Replies: 8
    Last Post: 05-14-2013, 11:53 AM
  4. [SOLVED] Macro to copy cell contents from the Header sheet into cell A2 on all worksheets
    By jsantos in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-15-2012, 06:28 PM
  5. Need a macro to put a 1 if the header is contained in a cell.
    By donnydorko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-15-2012, 05:53 PM
  6. Macro for Appending Data without Header to a database with header
    By tiang1209 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2007, 04:38 AM
  7. [SOLVED] Populating Last Saved Date in Cell AND also update that same cell in Header
    By o0o_Bigs_o0o in forum Excel General
    Replies: 2
    Last Post: 07-04-2006, 08:10 AM

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