+ Reply to Thread
Results 1 to 4 of 4

search formula

  1. #1
    Forum Contributor
    Join Date
    05-22-2006
    Posts
    103

    search formula

    hi,

    what seems to be wrong in this formula or is this formula valid?

    =IF(VLOOKUP(RIGHT($C3,LEN($C3)-FIND("^^",SUBSTITUTE($C3,"/","^^",LEN($C3)-LEN(SUBSTITUTE($C3,"/",""))))),'DATA SOURCE'!A$1:C$84,2,FALSE),IF(VLOOKUP(LEFT($C3,LEN($C3)-FIND("^^",SUBSTITUTE($C3,"/","^^",LEN($C3)-LEN(SUBSTITUTE($C3,"/",""))))),'DATA SOURCE'!A$1:C$84,2,FALSE)))

    thanks

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Unless there is something missing when it was posted, the formula is incomplete. You have nested if statements but you don't do anything with them. The following completes the formula, but is essentially meaningless.


    =IF(VLOOKUP(RIGHT($C3,LEN($C3)-FIND("^^",SUBSTITUTE($C3,"/","^^",LEN($C3)-LEN(SUBSTITUTE($C3,"/",""))))),'DATA SOURCE'!A$1:C$84,2,FALSE),IF(VLOOKUP(LEFT($C3,LEN( $C3)-FIND("^^",SUBSTITUTE($C3,"/","^^",LEN($C3)-LEN(SUBSTITUTE($C3,"/",""))))),'DATA SOURCE'!A$1:C$84,2,FALSE),"xx","yy"))


    hth

    rylo

  3. #3
    Forum Contributor
    Join Date
    05-22-2006
    Posts
    103
    Hi,

    thanks for the response...

    what i am trying to do with that formula is. if the first condition is true, it will return the value found in the vlookup hence, if not true it will do the second lookup....

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    I think you are going to run into trouble with the length of the formula required.

    Is it possible to:
    (a) get the left / right components into separate cells
    (b) do the vlookups on each component
    (c) do a test on the results and evaluate?

    If you really need to do it in one formula, then I think you will have to resort to building your own custom function.


    HTH

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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