+ Reply to Thread
Results 1 to 11 of 11

Choosing a Variable col_index_num in VLOOKUP

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    5

    Choosing a Variable col_index_num in VLOOKUP

    Hello Everyone,

    I am new in this forum, and I have a problem that I can't seem to solve.

    I am using a VLOOKUP function to pull data from a different excel, and I want to see if it's possible to use an equation that will determine the col_index_number.

    So here is a simplified version of my problem:
    excel problem.PNG

    So I would like to use VLOOKUP to pull total value of Cutting Fruits (Cutting total cost of apple + banana + orange).

    The problem here is that Cutting rate is not in the same column, and I would like to find a way for excel to look for the word "Cutting" for its specific fruit and extract the cutting value which is in the next column.

    I've been pondering about this for a while, and I thought I would reach out to the community. Any help/comments is very appreciated!

    Thanks,


    Eugene
    Attached Files Attached Files
    Last edited by esohn92; 02-11-2015 at 03:48 PM. Reason: uploading excel

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Choosing a Variable col_index_num in VLOOKUP

    Can you post an actual XL Book instead of a picture?
    Some people are behind firewalls that don't allow those pics to go through.
    Plus, it's just easier to work with a book, you can't copy the data from a picture into your own book to work with it..

  3. #3
    Registered User
    Join Date
    02-11-2015
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    5

    Re: Choosing a Variable col_index_num in VLOOKUP

    I dont think image is working. Here is what the excel sheet looks like:

    Name Count Fee_Name_1 Fee_Rate_1 Fee_Value_1 Fee_Name_2 Fee_Rate_2 Fee_Value_2
    Apple 5 Cutting $2.00 10 Seeding 1 $5.00
    Banana 8 Peeling $3.00 24 Cutting 2 $16.00
    Orange 10 Cutting $2.00 20 Peeling 1 $10.00



    Peeling Total Cost
    =VLOOKUP(A14,$A$1:$H$4,?????,FALSE)+VLOOKUP(B14,$A$1:$H$4,?????,FALSE)+VLOOKUP(C14,$A$1:$H$4,?????,FALSE)




    Apple Orange Banana

  4. #4
    Registered User
    Join Date
    02-11-2015
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    5

    Re: Choosing a Variable col_index_num in VLOOKUP

    Sorry you're right Jonmo1. I don't know how to upload a file here but here is the goolge spreadsheet link:
    https://docs.google.com/spreadsheets...gid=2016972759
    Thank you!
    Quote Originally Posted by Jonmo1 View Post
    Can you post an actual XL Book instead of a picture?
    Some people are behind firewalls that don't allow those pics to go through.
    Plus, it's just easier to work with a book, you can't copy the data from a picture into your own book to work with it..

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Choosing a Variable col_index_num in VLOOKUP

    To upload a book..

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  6. #6
    Registered User
    Join Date
    02-11-2015
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    5

    Re: Choosing a Variable col_index_num in VLOOKUP

    done

    Eugene
    Quote Originally Posted by Jonmo1 View Post
    To upload a book..

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Choosing a Variable col_index_num in VLOOKUP

    I restructured your data.

    After that an pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Choosing a Variable col_index_num in VLOOKUP

    Wow..
    Inconsistent data is the root of all evil in Excel.

    There's nothing you can do about the source of this data being more organized? So each fee type is in the same column?

    I'd make some helper columns to get those into some sort of order..
    Then you can use standard vlookups with a known colindex#

    Something like

    EFesohn.xlsx

  9. #9
    Registered User
    Join Date
    02-11-2015
    Location
    Houston, TX
    MS-Off Ver
    2010
    Posts
    5

    Re: Choosing a Variable col_index_num in VLOOKUP

    hmmm, so you guys are saying there is no way to do this without editing/touching the data? my goal is to not touch the data at all and still pull up the right data. there has to be a way for this!

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Choosing a Variable col_index_num in VLOOKUP

    I bet there is.

    But do you want to work efficient?

    In that case you are better off changing the data (imput).

    So I strongly advice you to change the data in a more usefull style.

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Choosing a Variable col_index_num in VLOOKUP

    Here is a very inefficient method (I still recommend a path toward better structured data)

    Array formula entered with CTRL + SHIFT + ENTER
    =SUM(IF(ISNUMBER(MATCH(A2:A4,A14:C14,0)),IF(C2:F4="Peeling",E2:H4)))

+ 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. VLOOKUP variable col_index_num
    By Soltisolti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-20-2014, 06:08 AM
  2. [SOLVED] Performing a VLOOKUP function with a variable col_index_num
    By esseeayen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2012, 06:48 PM
  3. [SOLVED] vlookup with variable col_index_num
    By 0-0 Wai Wai ^-^ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2006, 01:25 PM
  4. Vlookup Col_index_num
    By Mort Australia in forum Excel General
    Replies: 5
    Last Post: 03-24-2006, 06:40 AM
  5. Variable col_index_num in vlookup
    By Hugh Murfitt in forum Excel General
    Replies: 1
    Last Post: 02-15-2006, 08:20 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