+ Reply to Thread
Results 1 to 7 of 7

Macro for if cells with drop down list equal this, then other cells equal this

  1. #1
    Registered User
    Join Date
    10-11-2017
    Location
    San Antonio, TX
    MS-Off Ver
    7
    Posts
    41

    Macro for if cells with drop down list equal this, then other cells equal this

    Hello,

    need some assistance

    I have attached the worksheet

    We prefer VBA macro

    Cells "B3", "D3", and "F3" will be drop down list....Cells "H3" and "J3" will be the result

    So if B3, D3, and F3 equal B6, D6, and F6, then H3 and J3 equal H6 and J6

    this would apply for the entire worksheet

    Thank You
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365
    Posts
    1,397

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    trubio77,

    Slightly confused here.

    Row 3 contains headers. Do you mean the data you select from DropLists in B1, D1 and F1 triggers what appears in H1 and J1?

    Ochimus

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    see attached workbook.
    You can select from drop down lists in B3, D3 and F3.
    If there is a match on one of the rows then values from that row for columns H and J will be copied to H3 and J3.
    You can modify the macro or add msgbox if you want to cover situations where there is no match.

    Hope this helps.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    trubio77
    Ochimus brings up a good point. You can modify my macro to work with Row 1 instead of 3.
    I'll post a revised copy shortly.

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    Ok, so this is the revised version.
    you now work with Row 1.

    Let me know if this works for you.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    Here's the macro.

    HTML Code: 

  7. #7
    Registered User
    Join Date
    10-11-2017
    Location
    San Antonio, TX
    MS-Off Ver
    7
    Posts
    41

    Re: Macro for if cells with drop down list equal this, then other cells equal this

    Thank You Modytrane

    This worked

+ 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. Replies: 2
    Last Post: 09-11-2017, 03:42 PM
  2. How to verify if cell value is equal to a list of other cells
    By laxminarayana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2014, 02:17 PM
  3. [SOLVED] Macro to cause a certain set of cells to equal another set of cells given variable
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2014, 02:45 PM
  4. How do I get a list of cells with a value already in it to equal 1?
    By k.ferra7 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 04-10-2013, 08:38 AM
  5. Highlight cells from a list which equal a target value
    By Kward13 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-29-2012, 08:07 AM
  6. When cells equal run macro
    By GMBing in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2012, 11:57 PM
  7. Replies: 2
    Last Post: 04-21-2010, 07:25 AM

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