+ Reply to Thread
Results 1 to 3 of 3

Wants to apply vba code to multiple cell

  1. #1
    Registered User
    Join Date
    07-19-2016
    Location
    Ahmedabad, India
    MS-Off Ver
    2013
    Posts
    3

    Question Wants to apply vba code to multiple cell

    I want to apply below vba code to cell range F11:F2000 and want to get result relatively

    please help

    Please Login or Register  to view this content.
    Last edited by alansidman; 07-19-2016 at 10:47 AM.

  2. #2
    Registered User
    Join Date
    07-19-2016
    Location
    Ahmedabad, India
    MS-Off Ver
    2013
    Posts
    3

    Re: Wants to apply vba code to multiple cell

    I want to apply code for below function/logic:

    if Cell A1 = "1" then Cell B1 = locked and empty, Cell C1 = unlocked and allowed to select value from drop down list, cell D1 = locked and empty
    if Cell A1 = "2" then Cell B1 = unlocked and allowed to select value from drop down list, Cell C1 = locked and empty, Cell D1 = unlocked and allowed to select value from drop down list
    if Cell A1 = "3" then Cell B1 & C1 & D1 = unlocked and allowed to select value from drop down list
    If Cell A1 = "" then Cell B1 & C1 & D1 = locked and empty

    if Cell A2 = "1" then Cell B2 = locked and empty, Cell C2 = unlocked and allowed to select value from drop down list, cell D2 = locked and empty
    if Cell A2 = "2" then Cell B2 = unlocked and allowed to select value from drop down list, Cell C2 = locked and empty, Cell D2 = unlocked and allowed to select value from drop down list
    if Cell A2 = "3" then Cell B2 & C2& D2 = unlocked and allowed to select value from drop down list
    If Cell A2 = "" then Cell B2 & C2 & D2 = locked and empty

    I want to apply this function / logic in A1 to A2000 relatively

    I hope its clear & sufficient to get answered

    Please revert asap

    thanks in advance

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,709

    Re: Wants to apply vba code to multiple cell

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] Apply VBA code to multiple cells
    By rosenina18 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-14-2024, 08:07 AM
  2. Apply VBA code to multiple sheets
    By PaulusKabouter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2013, 11:37 AM
  3. Apply VBA code to multiple cells
    By jond291 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2013, 07:33 AM
  4. [SOLVED] Can i modify this code to apply to multiple checkboxes and sheets?
    By stolen_83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 02:44 PM
  5. [SOLVED] Match code to apply multiple cells in 1 Sub
    By colvinb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2012, 06:38 AM
  6. Need to apply VBA code to multiple Worksheets
    By parteegolfer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2006, 04:43 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