+ Reply to Thread
Results 1 to 8 of 8

Not change headers

  1. #1
    Registered User
    Join Date
    04-09-2023
    Location
    USA
    MS-Off Ver
    2021
    Posts
    34

    Not change headers

    Dear Experts,
    I have tried to record macro then run maro in another sheet, then i have written code to prevent the repeat headers and it works, but when i changed header's name like Category want change to Categories, Total Cost want change to Total, it not reflect in my sheet.
    Attached file
    Attached Files Attached Files
    Last edited by SamS_23; 08-20-2023 at 02:18 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862

    Re: Not change headers

    Not really sure what you mean here ... how did you expect changing a header name in one sheet would reflect in another, unless the header in the other sheet had a formula referencing the cell you are changing?

    With your data laid out as it is, this code:
    Please Login or Register  to view this content.
    ... will never fire because "Item" is in A1.

    The rest of your code is better written like this:
    Please Login or Register  to view this content.
    You don't need to select any cells unless you actually want to. But I still don't know what you mean by the headers not changing and your code doesn't copy any data so I also don't know how you get data from "Recording" to "Execute Macro". All this is doing is overwriting the header values & formatting them.
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

  3. #3
    Registered User
    Join Date
    04-09-2023
    Location
    USA
    MS-Off Ver
    2021
    Posts
    34

    Re: Not change headers

    Actually I want change header's name that I want to change Category to CATEGORIES and Total Cost to TOTAL in sheet after run macro. I tried but not change after running macro.
    Attached image
    Attached Images Attached Images
    Last edited by SamS_23; 08-20-2023 at 03:29 PM.

  4. #4
    Registered User
    Join Date
    04-09-2023
    Location
    USA
    MS-Off Ver
    2021
    Posts
    34

    Re: Not change headers

    Waiting for response.

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Not change headers


    Then you must better explain in order there is nothing to guess !
    As for starters you can also activate the Macro Recorder and operate manually …

  6. #6
    Registered User
    Join Date
    04-09-2023
    Location
    USA
    MS-Off Ver
    2021
    Posts
    34

    Re: Not change headers

    Can you write vba code to change header's name which i have mentioned ?

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Not change headers


    For example to change cell B1 to 'Header2' try this codeline : [B1] = "Header2"

  8. #8
    Registered User
    Join Date
    04-09-2023
    Location
    USA
    MS-Off Ver
    2021
    Posts
    34

    Re: Not change headers

    I have done clear the headers then run the macro again after changing the headers and it works.
    Thank you for giving the solution. The Range properties is Awesome.
    Attached file
    Attached Files Attached Files

+ 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. How to change the position of slicer headers?
    By nimv1 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 10-29-2018, 04:21 AM
  2. [SOLVED] change the position of colum headers from A1 > A5 to A1 > E1
    By tigerpie in forum Excel General
    Replies: 3
    Last Post: 02-12-2013, 08:13 AM
  3. How to copy sheet & change col headers
    By pazzuzu in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-18-2010, 07:22 PM
  4. How can I change the settings on the row headers/
    By Ngozi Nmezi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-07-2006, 01:10 PM
  5. RE: How can I change the settings on the row headers/
    By Kevin Vaughn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-07-2006, 01:00 PM
  6. How do I change headers for all worksheets in a workbook?
    By frankfine in forum Excel General
    Replies: 7
    Last Post: 08-11-2005, 12:05 PM
  7. [SOLVED] How do I change the color of my row and column headers?
    By David DiLallo in forum Excel General
    Replies: 1
    Last Post: 05-19-2005, 09:08 PM

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