+ Reply to Thread
Results 1 to 4 of 4

Reference against a Column Header doesn't shift down

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Sweden
    MS-Off Ver
    MS 365 version 2302
    Posts
    18

    Reference against a Column Header doesn't shift down

    Hi all,

    I have an excel file formatted as a table with the following layout:

    Item Area
    a01 CAR
    a02 CAR
    a03 CAR
    b01 TRAIN
    c01 AIR
    c02 AIR
    d01 MC
    d02 MC

    To get the new column called "New Area" I compare the current value in the Area-column with the previous value, if equal I write "" else I take the value from the Area -column.. this is how I want it:

    Item Area New Area
    a01 CAR CAR
    a02 CAR
    a03 CAR
    b01 TRAIN TRAIN
    c01 AIR AIR
    c02 AIR
    d01 MC MC
    d02 MC

    But this I get from excel:
    But on the first line I must compare the value against the column header Area

    a01 CAR CAR
    a02 CAR CAR
    a03 CAR CAR
    b01 TRAIN TRAIN
    c01 AIR AIR
    c02 AIR AIR
    d01 MC MC
    d02 MC MC

    The calculation for the first line:

    =IF([@Area]<>Table5[[#Headers];[Area]];[@Area];"")

    The calculation for the second line:

    =IF([@Area]<>Table5[[#Headers];[Area]];[@Area];"")

    It still refers to the header, how can I fix this?

    Thanks!

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Reference against a Column Header doesn't shift down

    attach a sample excel file with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    04-09-2014
    Location
    Sweden
    MS-Off Ver
    MS 365 version 2302
    Posts
    18
    Hi,

    see attached file.

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Reference against a Column Header doesn't shift down

    Hi,

    You need only replace the Table5[[#Headers],[Area]] part with the cell address- e.g. J2 in your example file, so the formula is
    =IF([@Area]<>J2,[@Area],"")
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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. Dynamic reference to Table Column header
    By aiyathomas in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-08-2017, 10:30 PM
  2. [SOLVED] Reference in a row with value to return the column header
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2014, 08:05 AM
  3. Replies: 2
    Last Post: 03-03-2014, 10:56 AM
  4. Find the row header and column label from a cell reference
    By Clddleopard in forum Excel General
    Replies: 3
    Last Post: 09-08-2011, 07:42 PM
  5. Replies: 6
    Last Post: 05-25-2010, 08:44 AM
  6. Excel Cell Reference and Column Header
    By santhu123 in forum Excel General
    Replies: 3
    Last Post: 04-21-2009, 03:51 AM
  7. return column header of first column that doesn't contain 0
    By jasonanthony in forum Excel General
    Replies: 3
    Last Post: 02-09-2009, 05:36 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