+ Reply to Thread
Results 1 to 10 of 10

Need to auto-populate cells "N/A" when selecting from a drop-down list.

  1. #1
    Registered User
    Join Date
    08-17-2015
    Location
    Vancouver, WA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Need to auto-populate cells "N/A" when selecting from a drop-down list.

    Hello Forum,

    I have a need to auto-populate certain cells "N/A" when I select from a drop-down list. I know about VLOOKUP and the IF formula and have used it before, But I'm not sure if it will work in my scenario. I can't enter any formula in a cell where the "N/A"s go because depending on the drop-down selected, data may need to be entered into that cell (thus overwriting that formula).
    I attached a snip of the spreadsheet I'm working on.
    In reference to attachment... the drop-down in column C lists numbers 1-4. For example, if 3 is selected in C27, I need an N/A to populate in cells J27, T27, P27, V27.

    Is there a way make this happen? Again, I can't enter a formula into the cells that need the N/A.
    Attached Images Attached Images

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

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    If you can't use a formula, you'll have to use VBA. Can you upload a real spreadsheet (Go Advanced>Manage Attachments)? What determines whether a cell will have a number or a N/A?
    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

  3. #3
    Registered User
    Join Date
    08-17-2015
    Location
    Vancouver, WA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    I attached a spreadsheet of what I'm working on (the cells mentioned before don't match the the snip attachment, so disregard the earlier thread).

    I'm unfamiliar with VBA. I'd like to learn more.

    How the spreadsheet is currently filled out is how the N/A's are determined.

    In reference to the attached spreadsheet...Column C has a drop down.
    If selected "4", no N/A's in that row.
    If selected "3", N/A in cells J,T,P,V (row 5).
    If selected "2", N/A in cells H,J,N,P,R,T,V (row 7).
    If selected "1", N/A in cells F,H,J,L,N,P,R,T,V (row 9).

    I hope that clears up any questions.
    Attached Files Attached Files

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    What if you select 2 and after that you change it into 3?
    What happens with 3 - G cell?

    Also, there's absolutely NO REASON to use merged cells in such case.
    If you wanted to have bigger cells you could just make cells bigger.

  5. #5
    Registered User
    Join Date
    08-17-2015
    Location
    Vancouver, WA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    Right now, nothing happens to the cells if you change the drop-down selection. My thoughts and hopes would be if you did select a number, specific cells would fill in N/A. (I added conditional formatting to have that cell turn grey if an N/A is present).
    So if my vision can work...if I were to change the number from 2 to a 3, the N/A's would change accordingly.

    About the merged cells...I can't just expand a column because it would mess with my formatting on the entire page. I have a bunch of data entry forms above and below the section I posted here. And expanding would distort everything else.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    If you change from 3 to 2 it will just add N/A into some cells.
    But when you change 2 to 3 some N/A will be removed.
    What will happen with those cells? Blank? Some formula? Some value?

  7. #7
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    I can put together some VBA to:
    1. on change of dropdown -clear the old N/As and set the new N/A
    2. I could colour the cells accordingly as part of the VBA or leave that to your conditional formatting

    Obviously:
    1. if the new drop down value causes N/A in new cells the old values will be lost
    2. if N/A are cleared from some cells they will be blank

    doing this in VBA will allow values to be overtyped


    click on the * Add Reputation if this was useful or entertaining.

  8. #8
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    please see the test file in attach.

    It doesn't show you "N/A" but only uses "black out" indication in designated cells with conditional format (no formula used)
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    I am heading to airport to take a flight now, will come back to check .

  10. #10
    Registered User
    Join Date
    08-17-2015
    Location
    Vancouver, WA
    MS-Off Ver
    MS Office 2013
    Posts
    6

    Re: Need to auto-populate cells "N/A" when selecting from a drop-down list.

    I see you used conditional formatting. I haven't thought to use it that way. Thanks a bunch for your assistance. This should solve my issues.
    Last edited by dpeek; 01-12-2016 at 05:50 PM.

+ 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. Is it possible to reverse the order in a cells "Drop Down List"?
    By ElmerFud in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2015, 02:16 PM
  2. [SOLVED] Auto-populate "Yes" "No" based on multiple criteria.
    By jtmoore in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 09:12 AM
  3. Cmd Button to populate all drop down list on a worksheet as "Yes"
    By mike1199 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-29-2013, 02:55 PM
  4. Solution to populate cell with "X" by selecting "R"
    By nirola in forum Excel General
    Replies: 4
    Last Post: 11-17-2012, 10:15 AM
  5. Replies: 0
    Last Post: 08-30-2012, 04:39 PM
  6. Getting "like named" products to populate from drop down list
    By ssa9320 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2008, 08:16 PM
  7. [SOLVED] "Create a drop-down list from a range of cells"
    By DILNAVAS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-03-2006, 03:45 AM

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