+ Reply to Thread
Results 1 to 11 of 11

Excel 2007 : Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

  1. #1
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Question Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Hi, I am using Vlookup, but I have a problem, I have 2 identical items within my range.

    If I have as follows:
    IC Prov 145.00
    IC Prov 150.00

    My formula is as follows:
    Please Login or Register  to view this content.
    How can I modify the formula to ignore the first "IC Prov" and return the value on the second "IC Prov" without having to change the range?

    Thanks
    Last edited by sonar123; 03-05-2011 at 06:53 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    A bit messy, but try
    Please Login or Register  to view this content.

    Why are there 3 spaces trailing your Lookup value "IC Prov"?
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    There is space trailing it because it is that way in the ascii format that gets converted into excell, I managed to fix that by using * after the word to subsitute spaces etc. before the last ".

    Thanks, will try the formula.

    By the way, can you please explain that extra insert?

    Thanks

  4. #4
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    The formula targeted the first IC Prov, how do I get it to return a figure on the second one and not the first one?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Quote Originally Posted by sonar123
    The formula targeted the first IC Prov, how do I get it to return a figure on the second one and not the first one?
    Marcol's suggestion should work ok as I see it - returning the appropriate value from Col W

    Another alternative would be to adopt a basic SMALL based non-volatile Array:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Hi, thanks, but I have tried it and it still does not target the second IC Prov.

    I have attached the spreadsheet.
    The total of IC Prov of R33251.94 (cell W34) must be returned in cell E21, not R33251.94 (cell W21)

    I know it displays the same figure as provident fund for employee and co should be the same figure. But I have encountered where it is not.

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Perhaps not the best example given both values cited are the same, however, the Array will work if you modify the INDEX range to W rather than X:

    Please Login or Register  to view this content.
    Marcol's original suggestion works without issue also.

  8. #8
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Thanks a mill. it works perfectly.

  9. #9
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Red face Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Can the formula
    Please Login or Register  to view this content.
    be modified so if there is only one IC Prov, it does not return nothing, but returns the first one it sees? And can we eliminate the space trailing IC Prov ?

    Just using IC Prov as an example. Most other items appears only once and I would like to modify the formula to use for all off them.

    Thanks

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Quote Originally Posted by sonar123
    Can the formula be modified so if there is only one IC Prov, it does not return nothing, but returns the first one it sees?
    Perhaps

    Please Login or Register  to view this content.
    Regards removing trailing spaces - possibly but that rather depends on the exclusivity of the search terms (use of wildcards in the COUNTIF etc)

  11. #11
    Registered User
    Join Date
    03-05-2011
    Location
    Cape Town, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Getting Vlookup to ignore 1st "IC Prov" and return value on second "IC Prov"

    Thanks once again. You were a great help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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