+ Reply to Thread
Results 1 to 8 of 8

Force Cells to be completed based off another cell

  1. #1
    Registered User
    Join Date
    12-31-2018
    Location
    Leeds
    MS-Off Ver
    Excel
    Posts
    4

    Force Cells to be completed based off another cell

    Afternoon.

    I am trying to use VBA to put measures onto a spreadsheet to no avail.

    I am looking for some help with coding for the following.

    Once D2 is completed I'm looking for each cell after up to J2 to be mandatory
    If a cell is attempted to be completed not in sequence to remove the data and error to pop up
    have this repeated for each row on the spreadsheet (700)
    There will be some rows that only go up to C ( this seems to be where I am having the problem)

    Any help would be great

    Thanks

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

    Re: Force Cells to be completed based off another cell

    You should attach a sample workbook to show the setup and fill in expected result.
    Also, How does the program know how far each row needs to be filled in?
    You say some rows go up to C and others may go up to J.
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Registered User
    Join Date
    12-31-2018
    Location
    Leeds
    MS-Off Ver
    Excel
    Posts
    4

    Re: Force Cells to be completed based off another cell

    I've attached a sample of what the spreadsheet looks like fully completed.

    The coding that I was using only looked from D on wards to J but was getting error messages when there was a row that didn't go past D.
    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: Force Cells to be completed based off another cell

    Still not clear what you are looking for.
    Is it always true that data doesn't need to be filled in if column C is "No"?
    You need to define the logic to be used to determine how many columns need to be filled in.
    For example:
    If I start typing in D3, is it ok while C2 is "No"? what id C2 was a "Yes", would I be allowed to type in D2? How many columns would I be expected to fill in?

    Please define your requirements clearly.

  5. #5
    Registered User
    Join Date
    12-31-2018
    Location
    Leeds
    MS-Off Ver
    Excel
    Posts
    4

    Re: Force Cells to be completed based off another cell

    So I am looking for the cells in the row for column E-J to be mandatory if there is a value in D.

    So in theory if a value is inputted in D2 it forces them to input details into E2 and then F2 and so on until J2, and if they try to enter it in a cell that is not in order to remove this and show a pop up

    There are a few options that they can input into column C - only if it is a yes will they need to fill in the remaining cells

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Force Cells to be completed based off another cell

    This is probably best achieved with a macro. Are you comfortable with that or are you looking for some function only solution?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  7. #7
    Registered User
    Join Date
    12-31-2018
    Location
    Leeds
    MS-Off Ver
    Excel
    Posts
    4

    Re: Force Cells to be completed based off another cell

    Ive only started looking into VBA so I'm a bit useless , this is a code that I was using but seem to have hit a brick wall as doesn't like the rows where it doesn't go past "C"


    Please Login or Register  to view this content.
    Last edited by AliGW; 12-31-2018 at 01:16 PM.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Force Cells to be completed based off another cell

    Nathan - please note that programming code should be wrapped in code tags. As you are a new member, I have done this for you this time. Please do it yourself in future.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Progress bar based on cells completed
    By jhightowerisc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2016, 03:10 PM
  2. Force cell completion based on another Cells Value
    By PaulCooke in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2015, 08:59 AM
  3. [SOLVED] Gantt Chart - Changing cell color based on % completed
    By ktbb0312 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-13-2014, 06:40 PM
  4. Replies: 4
    Last Post: 03-14-2012, 12:29 PM
  5. Force a field to be completed
    By kellyhilde in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-17-2006, 09:06 AM
  6. Force comment based on cell's value
    By Ricktaxx in forum Excel General
    Replies: 4
    Last Post: 05-05-2006, 02:25 PM
  7. Want a number of cells to be auto completed based on entry in one.
    By matt ashley in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2005, 06:06 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