+ Reply to Thread
Results 1 to 6 of 6

Formula to make it mandatory to fill in one cell if another cell has data in it

  1. #1
    Registered User
    Join Date
    03-17-2013
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Formula to make it mandatory to fill in one cell if another cell has data in it

    Hi,

    I'm new to this and hoping someone can help me, I've tried to get my answer by viewing other posts but don't seem to be making any progress! I would like it to be mandatory to select an answer from the dropdown options in cell F8 if cell D8 has data in it.

    I would like to do the same for the following:

    F10 if D10 has data
    F12 if D12 has data
    F14 if D14 has data
    F16 if D16 has data
    F18 if D18 has data
    I8 if G8 has data
    I10 if G10 has data
    I12 if G12 has data
    I14 if G14 has data
    I16 if G16 has data
    I18 if G18 has data
    L8 if J8 has data
    L10 if J10 has data
    L12 if J12 has data
    L14 if J14 has data
    L16 if J16 has data
    L18 if J18 has data
    O8 if M8 has data
    O10 if M10 has data
    O12 if M12 has data
    O14 if M14 has data
    O16 if M16 has data
    O18 if M18 has data

    If someone could help me out it would be greatly appreciated! Thanks,

    Mark
    Attached Files Attached Files

  2. #2
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to make it mandatory to fill in one cell if another cell has data in it

    You can use conditional formatting to point out the error...

    1. Select cells F8:F18
    2. Click 'Conditional Formatting' and create a new rule using the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    3. Re-select F8:F18, double click on Format Painter, then click on I8, L8 and O8.

    Hope that helps.

    - Moo

  3. #3
    Registered User
    Join Date
    03-17-2013
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula to make it mandatory to fill in one cell if another cell has data in it

    Hi,

    Thanks for taking the time to have a look at the problem I've got,

    I have tried highlighting the cells, selecting Conditional Formatting, New Rule, then it asks me to select a rule type, I selected Use A Formula To Determine Which Cells To Format and typed in the formula but it hasn't worked.

    Any idea what I have done wrong?

    Thanks,

    Mark

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to make it mandatory to fill in one cell if another cell has data in it

    Not sure if you skipped a step, or didn't choose any formatting to display, but see my attached sheet for an example.

    You'll notice that cells F8, F10, F12, F14, F16 and F18 (As well as same rows in columns I, L, and O) are highlighted red because there is nothing in cells D8:D18 (and G, J, M)... as soon as you enter data in the coresponding cells in columns D, G, J or M, the red formatting will disappear.

    - Moo
    Attached Files Attached Files
    Last edited by Moo the Dog; 03-18-2013 at 10:06 AM.

  5. #5
    Registered User
    Join Date
    03-17-2013
    Location
    Surrey, England
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Formula to make it mandatory to fill in one cell if another cell has data in it

    Thanks again.

    One last question - is there any way to make an error message come up if they try to save it without filling in the field I want them to fill in.

    So for example, they put a figure in D8 and E8 but then try to save it without selecting an answer from the dropdown in F8, can I make an error message come up telling them to fill it in?

  6. #6
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Formula to make it mandatory to fill in one cell if another cell has data in it

    Mark,

    What you ask can likely be done with VBA using a BeforeSave event (or something similar). I am not very good with VBA, so I would recommend you start a new thread (in the VBA section of this site) asking the question 'Require input data in certain cells if other cells are filled before saving'... or something along those lines, and you may get the info you need.

    - Moo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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