+ Reply to Thread
Results 1 to 11 of 11

Find value in column, and display ajacent cell

  1. #1
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Find value in column, and display ajacent cell

    Hey Everyone,

    ** Edit ** Accidentally deleted first half of title, should read "Find value in column, and display ajacent cell"

    I've been going insane trying to get excel to do what I want; a brief explanation...

    Working on delivery sheets that have a list of customers that we service in column "C", and the types of products we deliver to them in column "G".

    What I'm trying to accomplish is creating a "build sheet" on a separate spreadsheet for our plant workers that will update automatically when the run sheets are updated.

    On to the issue; some of our customers own their own product, and in column "G", the term "C.O.G." is placed.
    What I need to happen; Any time the value "C.O.G." occurs on a run sheet, I need the route build to display the customer name from column "C".

    Here's a sample attached;

    Any help would be much appreciated.

    Thanks,

    -Chris
    Attached Files Attached Files
    Last edited by FDibbins; 12-23-2013 at 05:07 PM. Reason: Title corrected, based on OP's comments

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: , and display adjacent cell

    Just use a VLOOKUP formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Leon V (AW); 12-23-2013 at 01:26 PM.
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  3. #3
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: , and display adjacent cell

    Have tried the Vlookup formula, however the values in the array are not in the "correct" order (-2,-1, 0, etc.) for it to return the correct values.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: , and display adjacent cell

    VLOOKUP values only need to be arraigned in order if you are not looking for an exact match. If you add the "FALSE" argument as Leon did, then Excel will look through all data until it finds an exact match.

    Does that help?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: , and display adjacent cell

    Getting a # N/A result. Also, the formula needs to target the run sheet <=VLOOKUP("*C.O.G.*",'Mon. Rt 1 New'!C:G,5,FALSE)>, which also returns the same result.

  6. #6
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: , and display adjacent cell

    Also, VLookup according to the Office support page will only return 1 (the first) result; I need something that can return multiple values as there may be multiple customers needing to be listed.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: , and display adjacent cell

    See if this is what you had in mind:

    http://www.excelforum.com/tips-and-t...ml#post3376007
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: Find value in column, and display ajacent cell

    if you need multiple results use a countif on "*C.O.G.*" and a VLOOKUPNTH with the Nths being 1 to count. (you can google VLOOKUPNTH UDF)

  9. #9
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: , and display adjacent cell

    Quote Originally Posted by Tony Valko View Post
    See if this is what you had in mind:

    http://www.excelforum.com/tips-and-t...ml#post3376007
    Promising... However, the formula only generates the first customer with the "C.O.G." value.
    Last edited by Chris.Fadden; 12-24-2013 at 11:28 AM.

  10. #10
    Registered User
    Join Date
    12-23-2013
    Location
    Carson, California
    MS-Off Ver
    Excel 2000
    Posts
    6

    Re: , and display adjacent cell

    Made it work, just repeated the code in the lines below and it's listing just fine!

    You guys Rock!

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: , and display adjacent cell

    Good deal. Thanks for the feedback!

    If your question has been answered please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools>Mark this thread as solved.

+ 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. Getting data to display from an adjacent cell
    By cammyron in forum Excel General
    Replies: 11
    Last Post: 09-10-2009, 06:21 PM
  2. Display Formula in adjacent cell
    By troy69 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-19-2009, 08:54 AM
  3. User form to display adjacent cell value and move to next blank cell
    By Ketel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-21-2008, 03:15 PM
  4. Replies: 2
    Last Post: 03-07-2008, 08:05 PM
  5. Display adjacent cell as result...
    By prspiderman in forum Excel General
    Replies: 3
    Last Post: 02-24-2006, 01:45 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