+ Reply to Thread
Results 1 to 9 of 9

IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell dropdown

  1. #1
    Registered User
    Join Date
    05-15-2019
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell dropdown

    Hi,

    I need to use the IF/THEN argument but NOT fill that argument into the cells I need to obey it.

    See attached excel sheet with comment...it will be very clear what I'm asking.

    I have a YES/NO drop down menu in E8. The question to be answered by the drop down: Was this analysis required?

    If yes, I need all related cells to that analysis (non-sequential and highlighted on attached sheet) to remain blank and fillable for data entry. If "No" is selected from the drop down, I need all of those (non-sequential) highlighted cells to auto fill with N/A.

    Can anyone help with this?

    Thanks!
    Attached Files Attached Files
    Last edited by Lucinda_jane; 06-11-2020 at 03:37 PM. Reason: SOLVED

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    If I understand you correctly, you want (for instance) B14 to return NA depending on what is in E8, but you also what this cell to allow manual entry?

    A cell can contain EITHER a formula OR data (manually entered), it cannot contain both. So if this will be a regularly used form, you cannot do what you want, with formulas, you will need VBA.

    If this is a once off, you could indeed have your formula in B14 and allow the user to replace the formula with manually entered data - but then your formula is gone.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    As Ford, said, you can't do this with formulas unless you maintain a template that is used fresh each time. Here is a VBA solution. The code in the worksheet module clears the contents of your designated cells if the cell E8 is cleared or "Yes." If "No" is selected, the designated cells are filled with "N/A"
    Please Login or Register  to view this content.
    Attached Files Attached Files
    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

  4. #4
    Registered User
    Join Date
    05-15-2019
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Thank you SO much!!! The VBA approach fixed it and thank you for filling it! I am an excel novice, it would be great if you could tell me the steps you took for VBA to insert that command. Either way, it's solved. Thanks again!

  5. #5
    Registered User
    Join Date
    05-15-2019
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Thanks Ford. The VBA route was the one I needed. I am too much of a novice to have figured that out.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Happy to help

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Thanks for the rep

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

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Okay, first I created a defined name. I held down the contrl key while I clicked on all your your cells that you want (possibly) NA in. Then with all these selected, I clicked in the Name box (the little white box at the top that usually has a cell ID like A1. I typed Fillable into that box and hit ENTER. Now those cells are called Fillable. If you click on the dropdown arrow next to the Name Box, you will be able to select "Fillable" and excel will automatically select those cells. You can also find the Defined Name Manager on the Formula Tab of your Ribbon.

    From there, you would right click on the sheet tab and select "View Code." This opens up the VBA Editor to the sheet module. Then paste the code I wrote into the large white text area and close the VBA editor. Last step would be to save your workbook as an xlsm instead of an xlsx.

    Hope that helps.

  9. #9
    Registered User
    Join Date
    05-15-2019
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: IF/THEN:Make multiple cells read N/A or remain fillable depending on 1 other cell drop

    Thank you!!! That helps a ton. Thanks for the clear explanation

+ 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. Multiple Dropdown lists depending ALL on 1st Dropdown choice
    By perihelio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2019, 02:15 AM
  2. [SOLVED] makes cells populate or remain blank depending on what previous cell has in it.
    By cwrice in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-18-2018, 04:09 PM
  3. Replies: 18
    Last Post: 04-16-2016, 02:55 PM
  4. [SOLVED] How to Make a Cell Read only depending upon Value of another cell
    By nav_nav2000 in forum Excel General
    Replies: 2
    Last Post: 11-19-2013, 02:41 AM
  5. [SOLVED] If cell dropdown equals no, then make a range of cells uneditable?
    By jager in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-10-2013, 12:47 AM
  6. Replies: 5
    Last Post: 06-26-2009, 12:42 PM
  7. [SOLVED] Procedure to make a dropdown list larger so it's easier to read
    By Jack Oziel in forum Excel General
    Replies: 4
    Last Post: 12-26-2005, 01:55 PM

Tags for this Thread

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