+ Reply to Thread
Results 1 to 8 of 8

Formulas as a result of Vlookup

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    4

    Formulas as a result of Vlookup

    I have a file where every day few hundred records are copied to column A.
    I need to find a way to use different formula for different result of Vlookup (or index+match) formula.

    Column A
    Alfa
    Beta
    Charlie
    Delta
    etc

    Table array for Vlookup
    Alfa Formula A
    Beta Formula B
    Charlie Formula C
    Delta Formula D
    .... Formula X

    Formulas are all different and there is too many of them to use nestled If.
    What would be the most efficient way to solve it.
    Thx

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formulas as a result of Vlookup

    On limited testing:

    =VLOOKUP(A2,$C$2:$D$5,2,0)

    A2="Alpha"

    C:D contains the lookup value and Formula

    C2: "Alpha"
    D2: with the formula "=SUM(G1:G10)" (without quotes)

    C3: "Beta"
    D3: =Average(G1:G10)

  3. #3
    Registered User
    Join Date
    01-26-2016
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    4

    Re: Formulas as a result of Vlookup

    I should have mentioned that formulas A to X use data from Column A
    f.e
    in column A I can have
    A1 - Alfa 5000
    A2 - Alfa 7000
    A3 - Beta 1000
    A4 - Charlie 1.25

    Lets say
    Formula A is = cell / 10
    Formula B is = cell * 3
    Formula C is = cell - 0.25

    So results should be
    for A1 = 500
    for A2 = 700
    for A3 = 3000
    for A4 = 1

    These formulas are just examples.
    All I need to know is how to write the formula in table array so it is used properly as a vlookup result.
    Last edited by xfish; 01-26-2016 at 06:01 AM.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formulas as a result of Vlookup

    You cannot have both a value and a formula in a cell so what you require cannot be done with formulae: you will need VBA.

    In addition you have the complication separating the data from the "code" which to be included in any formula.

    Need to rethink!
    Last edited by JohnTopley; 01-26-2016 at 06:37 AM.

  5. #5
    Registered User
    Join Date
    01-26-2016
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    4
    Quote Originally Posted by JohnTopley View Post
    You cannot have both a value and a formula in a cell so what you require cannot be done with formulae: you will need VBA.

    In addition you have the complication separating the data from the "code" which to be included in any formula.

    Need to rethink!
    It was just an example.
    I have long strings from which I can extract parts (lets say parts are Alfa, Beta etc and I have them in new column(B)
    Now when I have Alfa I need to extract last word from the string in column A, for Beta I need first word etc. I know how to make these formulas. I Could make nestled IF
    If(B1="Alfa",extract last word from A1,if(B1="Beta",extract first word from A1,... Etc but it would be huge.
    That's why I would like to use vlookup.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formulas as a result of Vlookup

    You need to post a sample workbook as each description of your problem differs. First you implied doing arithmetic, now you talk about extraction of text from a string.

    You can waste a lot of "FREE" time given by respondents by not defining concisely what you require.

  7. #7
    Registered User
    Join Date
    01-26-2016
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    4
    Quote Originally Posted by JohnTopley View Post
    You need to post a sample workbook as each description of your problem differs. First you implied doing arithmetic, now you talk about extraction of text from a string.

    You can waste a lot of "FREE" time given by respondents by not defining concisely what you require.
    I'm sorry but I have never asked such a question on forum plus my english is far from perfect.

    My question is: can I have a dynamic formula in table array that is used as a result of Vlookup.

    Example file attached.
    Attached Files Attached Files
    Last edited by xfish; 01-26-2016 at 07:31 AM. Reason: Attachment

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Formulas as a result of Vlookup

    VBA solution

    Please Login or Register  to view this content.

+ 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. [SOLVED] Vlookup using an Average result to look up ... NA result
    By twetzel2k in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 02-14-2014, 12:16 PM
  2. Replies: 5
    Last Post: 01-31-2013, 12:55 PM
  3. [SOLVED] Combining two formulas to get one result
    By jaycee66 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-24-2012, 06:47 PM
  4. Result of two formulas (vlookup and Color) into one CELL
    By cybertaurean in forum Excel General
    Replies: 4
    Last Post: 10-10-2012, 03:32 AM
  5. isblank & vlookup formula returns #n/a result and incorrect result
    By helpmeplease333 in forum Excel General
    Replies: 5
    Last Post: 05-06-2012, 11:41 PM
  6. Joining 2 "VLOOKUP" Formulas to get a single result?
    By JES65FLA in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-29-2011, 12:50 PM
  7. [SOLVED] vlookup based on random result returns incorrect result
    By rickat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2005, 09:20 AM
  8. Two identical formulas for a different result?
    By hochedez in forum Excel General
    Replies: 5
    Last Post: 09-08-2005, 10:43 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