+ Reply to Thread
Results 1 to 3 of 3

vba search for value in column, return corresponding cells in same row

  1. #1
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    vba search for value in column, return corresponding cells in same row

    Hi,

    I have a vba problem which seems straight forward but I can't figure out how to do it. Basically I'm trying to set up an excel file whereby a user will select their state via a dropdown. I need a macro that will then search in my raw data for the state they input and return the corresponding value(s). The state is found in column A and I'd then like to return the corresponding values from columns B and C. There will multiple values in Column A hence the reason I can't use vlookups. I'll be updating the raw data tab on a regular basis so would like to summarise it on the 'Summary' tab. The actual dataset is a lot bigger than this so I want to be able to break out down by state as this is what the end users will be interested in. I've attached the mockup data. Any help would be greatly appreciated.

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: vba search for value in column, return corresponding cells in same row

    try it (see attachment)
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: vba search for value in column, return corresponding cells in same row

    Thanks nilem, worked perfectly. Are you able to explain how it works?

+ 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