+ Reply to Thread
Results 1 to 4 of 4

Return Column Header for First and Last Columns to Contain a Value

  1. #1
    Registered User
    Join Date
    05-26-2017
    Location
    La Paz, Bolivia
    MS-Off Ver
    2016
    Posts
    2

    Smile Return Column Header for First and Last Columns to Contain a Value

    Hello All

    First Post here.

    First, let me say that I'm sorry if this has already been asked and answered. I've been googling for the past couple of hours and searching your forums as well but I can't find exactly what I'm looking for. I've found things that are similar but when I try to edit them for exactly what I need, I break the formulas as I am terrible with excel.

    What I am looking for is a formula that will return the column header of the first column to contain data in a row -and- a formula to do the same but instead with the last column to contain data.

    (See the cells highlighted in yellow. These are the results I would like to get)

    Screen Shot 2017-05-26 at 4.53.46 PM.png

    Thank you so much for the help. I have a list of 1500 supporters with 12 years of sporadic donations. I'd really like to avoid scanning each row manually.

    -Chris

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Return Column Header for First and Last Columns to Contain a Value

    try (with your example):
    B3: =INDEX($D$1:$I$1,MATCH(TRUE,INDEX($D3:$I3<>"",0),0))
    C3: =INDEX($D$1:$I$1,MATCH(99^9,$D3:$I3))
    both drag down

    adjust ranges to your needs

    btw. next time attach sample excel file not a picture.
    Attached Files Attached Files
    Last edited by sandy666; 05-26-2017 at 06:17 PM. Reason: example added

  3. #3
    Registered User
    Join Date
    05-26-2017
    Location
    La Paz, Bolivia
    MS-Off Ver
    2016
    Posts
    2

    Re: Return Column Header for First and Last Columns to Contain a Value

    Thank you so much for the help sandy666! This worked perfectly!

    Next time I will definitely post an excel example. I wasn't aware that I could do that.

    Thanks again!
    Chris

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Return Column Header for First and Last Columns to Contain a Value

    You are welcome
    Thanks for the feedback and mark thread SOLVED.

+ 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. Replies: 8
    Last Post: 03-23-2017, 02:59 PM
  2. [SOLVED] Compare multiple columns and return header value
    By sarajun_88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2017, 10:27 PM
  3. Return column header based on column criteria and number value
    By bwill22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-07-2014, 07:33 PM
  4. [SOLVED] Find specific value in table and return header row and header column value
    By nelwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-30-2013, 01:35 AM
  5. [SOLVED] Compare dates across columns and return column header
    By huy_le in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-29-2013, 07:07 PM
  6. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  7. Way to return a column header value?
    By Abgirl in forum Excel General
    Replies: 2
    Last Post: 05-20-2011, 12:39 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