+ Reply to Thread
Results 1 to 24 of 24

looking up a value in not exactly the same row from another column

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    looking up a value in not exactly the same row from another column

    I have three columns A,B and C. I want to look up a value in say row 2 of A in column B (mind you the exact value in row 2 of column A may be within the range of values in column B and in a row different from row 2 in B. In most cases the values are found in say row 5 in B while in A it is in row 7 or further down) and when the match is found in B, I need to return value from row X in column that matches same row in column B. ie the values to be return in column C will be at same row where the match from column, was found in column B.
    Something like "if A3=B1:B5,CX,0. such that the row CX= the row where the value in A3 is found in B1:B5.

    Thanks in anticipation of a swift response.

  2. #2
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: looking up a value in not exactly the same row from another column

    Try putting the formula below in cell "C1":

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and then copy the formula down column "C"

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    thanks but it didn't work. What I meant was to look for a value in B that matches a row in C, such that my response will come from column A, in that the result supplied from column A, will be at same row as the row in column B that matches the value in C.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: looking up a value in not exactly the same row from another column

    perhaps upload a sample worksheet alongwith expected results?
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    attached is d sample and sheet 2 contains the expected result. thanks
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    please all, can anyone assist with my query. I have attached a sample data and expected result.Thanks in anticipation of a favorable response.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: looking up a value in not exactly the same row from another column

    which bit is where the formula is going to go? oh i see you want to open up the missing gaps.is this a true representation of your data?
    Last edited by martindwilson; 07-16-2012 at 09:56 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    Yeah it is. More or else I want to open up the gaps. Hope to read from you soon. Thanks.

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: looking up a value in not exactly the same row from another column

    more or less? is numbers like that in sequence or random or text or a mixture,it makes a difference

  10. #10
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    the number on column A are random but in ascending order.

  11. #11
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    but the number for state and country are not random but they are also in ascending order.

  12. #12
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    please anyone with positive response? I desperately need this as am running on a tight schedule.

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: looking up a value in not exactly the same row from another column

    its not clear, i cannot see why

    00/01 ...1.....1
    ............... 2
    00/02 ...3... 3
    00/04....4.. 4
    00/05 ....5...5
    why is there a gap after 00/01
    Last edited by martindwilson; 07-18-2012 at 04:04 PM.

  14. #14
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: looking up a value in not exactly the same row from another column

    So, all the 1's need to be on the same row, all the 2's on the same row, and so on, with gaps for the blanks?
    Click on the * icon if this post has been helpful.

  15. #15
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    @ xer2 you are right.

    Please any idea on how to go about it. I am running on a tight timeline banking on you guys.
    Thanks.

  16. #16
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: looking up a value in not exactly the same row from another column

    The info in column "B", is it going to be values or formulas?

  17. #17
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: looking up a value in not exactly the same row from another column

    you probably could have done it manually by now!

  18. #18
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    I have more than 5 thousand entries. The problem is if I do it manually so where along the line I have to match it with a different set of data and repeat same process again. so doing it manually is not the smartest thing to do right now. Please if you can be of help let me know. I just have the feeling that you are stringing me along.

  19. #19
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    @Xer the info in column B will be values.

  20. #20
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: looking up a value in not exactly the same row from another column

    Try this:

    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    thanks will give you feedback later!

  22. #22
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    hello Xer2 am a novice please I tried running it in just the way you run normal excel command and I couldn't. Please if it is not some much of a trouble how do I run it?

  23. #23
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2016
    Posts
    165

    Re: looking up a value in not exactly the same row from another column

    Use this button and assign the macro to it, or use my file and copy your data into it.
    Attached Files Attached Files

  24. #24
    Registered User
    Join Date
    07-12-2012
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: looking up a value in not exactly the same row from another column

    Hello xer2 it works. But I noticed that as from 261 it matches 261 of column B to 262 of column c. I also observed that it looks at the last digit in column B and that of column C. below is an extract of the wrong match.

    "B" "C"
    . .
    . .
    289 298
    290 300
    291 301
    292 302
    293 303
    294 304
    295 305
    296 306
    297 307
    298 308
    309
    300 310
    301 311
    mid-way while running it it give an error message of 1004. How do I correct this?

+ 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