+ Reply to Thread
Results 1 to 7 of 7

How to compare when values changed and return the heading of that column of change

  1. #1
    Registered User
    Join Date
    10-30-2019
    Location
    Calabar, Nigeria
    MS-Off Ver
    Excel 2016
    Posts
    4

    How to compare when values changed and return the heading of that column of change

    I am working on a series of Excel data.

    Each name will have the same data until where the change occurred. I need a formula that can check each row of same data (in each record) and then 1. track where the first change occurred and 2. return the heading of that cell.


    The project is a list of staff in my organization who were on certain grade level until they were moved to a higher grade level. The movement was done at different times hence the problem of tracking them. Please can someone help?

    The expected output should be as shown in the RESULT COLUMN. Any help would be appreciated.result.JPG

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: How to compare when values changed and return the heading of that column of change

    We can't do much with a picture, so it would be better if you attached a sample Excel workbook instead.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-30-2019
    Location
    Calabar, Nigeria
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: How to compare when values changed and return the heading of that column of change

    Thank you Mr. Pete.

    This is the sample of the data. The headings are months which I need to track if change occurred. If it did, in which month (the header row should be returned at the point where the value changed.


    Godfrey
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: How to compare when values changed and return the heading of that column of change

    You can put this array* formula in P2:

    =IF(COUNTIF(C2:O2,C2)=13,"not changed",MIN(IF(D2:O2<>$C2,$D$1:$O$1)))

    *Note that an array formula must be confirmed using the key combination of Ctrl-Shift-Enter (CSE), rather than the usual Enter.

    Then you can copy it down as required.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    10-30-2019
    Location
    Calabar, Nigeria
    MS-Off Ver
    Excel 2016
    Posts
    4

    Thumbs up Re: How to compare when values changed and return the heading of that column of change

    Amazing! It worked like magic. Thank you Mr. Pete, this is a huge load taken off me. I feel like giving you a biiiiiiigggggg hug.

    Thank you brother.

    Godfrey

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,720

    Re: How to compare when values changed and return the heading of that column of change

    It will be difficult to do that from Nigeria, but I'm glad it worked for you.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  7. #7
    Registered User
    Join Date
    10-30-2019
    Location
    Calabar, Nigeria
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: How to compare when values changed and return the heading of that column of change

    Yes I'm new here, and you've solved my problem in no time. I'm thankful for all your comments.

    Godfrey

+ 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. TWO Excel files, compare and return column values
    By Elenot in forum Excel General
    Replies: 4
    Last Post: 08-29-2015, 08:07 AM
  2. [SOLVED] Return column heading of top 5 values, sorting alphabetically if there's a tie
    By abullock in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2013, 02:07 AM
  3. Replies: 6
    Last Post: 12-11-2013, 05:57 AM
  4. Replies: 0
    Last Post: 12-07-2011, 05:25 PM
  5. Replies: 1
    Last Post: 10-28-2011, 03:13 AM
  6. lookup values in a range,return corresponding column heading
    By aljaffa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2011, 04:31 PM
  7. Compare values in 2 columns, return Y/N in a third column
    By creed1101 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-08-2009, 01:29 PM

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