+ Reply to Thread
Results 1 to 14 of 14

certain mandatory cells

  1. #1
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    certain mandatory cells

    Hi everyone,
    how to make only yellow cells mandatory?
    The writing is horizontal, if I write in C3 and B3 is empty, a warning must appear etc ...
    john
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: certain mandatory cells

    Sorry John

    Your requirement is not clear. In your example B3 is not yellow so why would you expect a message?

    Right Click on your sheet name at the bottom of excel and select view code.

    Paste this code into the module that opens and close the module.

    Please Login or Register  to view this content.

    If you now select any yellow cell. You will get an alert if the cell to the left is empty.

    This will get you started.
    Last edited by mehmetcik; 09-18-2020 at 05:51 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: certain mandatory cells

    B3 is yellow for me? ( I suppose you meant C3 ?)
    @ john
    what are the rules to determine that B3 should be used before C4 ? What about E3 ?

  4. #4
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi mehmetcik work almost good.
    if I click in column A it gives an error

    error defined by application or object

  5. #5
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    if B3 is not compiled it is not written in all other cells
    if E3 is not compiled it is not written in all other cells
    if C4 is not compiled it is not written in all other cells
    if H4 is not compiled it is not written in all other cells

    etc.....

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: certain mandatory cells

    Ahh column A will always give an error because we are checking the cell to the left.

    Try this code instead.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi mehmetcik work almost good.
    Not work in column A
    another mistake:
    if I select a non-empty yellow cell, a warning appears
    Attached Files Attached Files
    Last edited by john_cash; 09-18-2020 at 07:55 AM.

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: certain mandatory cells

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi mehmetcik

    if I select a non-empty yellow cell, a warning appears <<< ok correct

    Not work in column A
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: certain mandatory cells

    It cannot work in column A. There is no Cell to the left of Column A so there is nothing that must be filled.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 09-18-2020 at 09:40 AM.

  11. #11
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi mehmetcik,
    i inserted a support column A now works better.
    Thank you very much
    john

  12. #12
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi

    Please Login or Register  to view this content.
    is a change possible?
    Now if I move with the tab closing the warning I can continue with the following cells.
    Is this possible?:
    until the first cell is filled in, you cannot continue and so on for the second, third etc ...

  13. #13
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: certain mandatory cells

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    10-31-2018
    Location
    venezia
    MS-Off Ver
    2007
    Posts
    487

    Re: certain mandatory cells

    Hi mehmetcik it's ok.
    it is possible instead of the yellow cells either

    Please Login or Register  to view this content.
    is referenced to cells but does not work

    Please Login or Register  to view this content.

+ 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. mandatory cells
    By xam99 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-14-2020, 02:58 PM
  2. Mandatory Cells
    By Rich789 in forum Excel General
    Replies: 1
    Last Post: 08-24-2017, 08:33 AM
  3. How can I make multiple cells mandatory if new rows are used with some cells left blank?
    By markbarnett in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2015, 07:06 AM
  4. Mandatory field required message when user skips mandatory fields
    By Bharathi27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2013, 05:12 AM
  5. Mandatory Cells
    By MYQ in forum Excel General
    Replies: 7
    Last Post: 10-12-2012, 02:16 PM
  6. Mandatory cells
    By john.mk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 02-25-2010, 11:03 PM
  7. Mandatory Cells
    By Mel1221 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-05-2006, 05:10 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