+ Reply to Thread
Results 1 to 3 of 3

Macro / formula to pull values from cells based on headers

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    Prague
    MS-Off Ver
    M365, version 2304
    Posts
    40

    Macro / formula to pull values from cells based on headers

    Hi all

    I had a recently similar question, and I was wondering if I could get your help again!

    I have a range of Excels with one constant value, and the rest varying. So, it looks like:

    No. ValueTagABC ValueTagABD2 ValueTagYN ValueTagSubtag

    00034 ValueTagABC ValueTagABD2 Y Subtag
    00067 ValueTagABC ValueTagABD2 Y Subtag
    00085 ValueTagABC ValueTagABD2 N Subtag


    No. ValueTagABC ValueTagXXY ValueTag2YN ValueTagSubtagOther

    00085 ValueTagABC ValueTagXXY Y SubtagOther
    00093 ValueTagABC ValueTagXXY N SubtagOther
    00022 ValueTagABC ValueTagXXY N SubtagOther

    The No. is the constant field - so I have another Excel with all of these numbers. What I need now is to populate this with all of the corresponding tags.

    These tags are split across multiple Excels, so I need to populate the header fields with the various tags, and then their corresponding value. I could get a list of all of the headers and put these into the Excel in the first instance if that would make things easier - but I won't know which column (B, C, D, X, etc.) will contain the actual correct value for each header.

    I hope this makes sense! Thank you in advance for any ideas!

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Macro / formula to pull values from cells based on headers

    In the example, you have a duplicate column header: ValueTagABC. How do you want to handle when the values in these columns have different values?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    Prague
    MS-Off Ver
    M365, version 2304
    Posts
    40
    Quote Originally Posted by dflak View Post
    In the example, you have a duplicate column header: ValueTagABC. How do you want to handle when the values in these columns have different values?
    Hi. Sorry I didn't reply earlier. Yeah - there are duplicate valuses across the Excels. What this is, is a dat which splits every 5,000 rows. If one set of 5,000 has certain values, these are populated. If a set doesn't have values, its field will be ignored.

    I fixed this one manually, but it wasn't pleasant..

+ 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 pull data from one cell based on certain criteria from 3 other cells
    By The Fly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2014, 01:46 PM
  2. [SOLVED] Formula to pull data based on one cells value
    By Dena in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-13-2014, 02:15 PM
  3. [SOLVED] Formula to pull data based on one cells value
    By Dena in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2014, 06:31 PM
  4. Return Headers Based On Two Values
    By just2cruz in forum Excel General
    Replies: 6
    Last Post: 06-16-2013, 08:31 PM
  5. Return Headers Based On Two Values
    By just2cruz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2013, 03:03 PM
  6. Macro to copy row values based on a identical column headers
    By Vijaya Pratap in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2013, 04:12 AM
  7. Formula To Pull Through Headers For Each Section
    By mccrimmon in forum Excel General
    Replies: 1
    Last Post: 03-30-2012, 07:03 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