+ Reply to Thread
Results 1 to 9 of 9

Data Validation or Conditional Formatting?

  1. #1
    Forum Contributor
    Join Date
    12-22-2015
    Location
    San Antonio, Texas
    MS-Off Ver
    2016
    Posts
    116

    Thumbs up Data Validation or Conditional Formatting?

    I have a spreadsheet that has the dates from 2017.01.01 to to 2017.12.31 in column A. Columns B, C, & D may or may not have a value in them. For example: On January first, I put a value only in column C for that day. I need a formula that, when the next day comes, Excel will see that no values were put in columns for the previous day—in this example, columns B & D don’t have a value—and would automatically put a value of "0" in the cells. I surmise an IF function that would use the syntax TODAY() in the formula would be the correct route, but I don’t know how to begin.

    =IF(TODAY()-1 is all I have with which to begin.

    Any help?
    Attached Files Attached Files
    Last edited by STBTC; 12-13-2016 at 10:24 PM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,900

    Re: Data Validation or Conditional Formatting?

    Paste the following formula into B2 then drag over to D2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    At this point you can double click the fill handle on D2 and all three columns will be filled with the formula down to row 32 (or row 366 if your dates in column A run through 12/31/17). You'll notice that when you type 5 into C2 it will overwrite the formula in that cell only.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Contributor
    Join Date
    12-22-2015
    Location
    San Antonio, Texas
    MS-Off Ver
    2016
    Posts
    116

    Re: Data Validation or Conditional Formatting?

    Instead of placing the formula in the cells themselves out of fear that my other coworkers who access the workbook would f*˘k it up, is there a way to put is as a conditional formatting formula? Or, if one couldn’t, is it possible to create a formula for that?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,779

    Re: Data Validation or Conditional Formatting?

    You could use VBA worksheet event macto to enter 0s into a cell. It cannot be done with a formula other than using the formula used by JeteMc.

    CF does not enable you to enter a value into a cell.

  5. #5
    Forum Contributor
    Join Date
    12-22-2015
    Location
    San Antonio, Texas
    MS-Off Ver
    2016
    Posts
    116

    Re: Data Validation or Conditional Formatting?

    How would I do that?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,779

    Re: Data Validation or Conditional Formatting?

    See attached.

    Please Login or Register  to view this content.
    To insert (or view) code, right click on tab ==>"View Code"

    If a complete row is blank i.e day skipped, that row remains blank.

    Just enter data into B, C or D
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    12-22-2015
    Location
    San Antonio, Texas
    MS-Off Ver
    2016
    Posts
    116

    Re: Data Validation or Conditional Formatting?

    If a complete row is skipped, instead of it remaining blank, can it be filled with zeroes?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,779

    Re: Data Validation or Conditional Formatting?

    Updated code:

    Please Login or Register  to view this content.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,900

    Re: Data Validation or Conditional Formatting?

    While I don't think that this is as good of a solution as the VBA that John has proposed, it may be suitable in some cases.
    1) Put a zero in B2,
    2) Drag the fill handle over to D2,
    3) While B2:D2 are selected press Ctrl and the down arrow,
    4) While B2:D32 are selected press Ctrl and D,
    5) Paste the following formula into conditional formatting (Use a formula to determine which cells to format):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    6) Choose to format the font as white to match the background.
    In the attached file I have selected B16 so that you can see that the value of zero is actually in the cell and will be become visible once the system calendar reaches 12/16/16.
    Let us know if you have any questions.
    Attached Files Attached Files

+ 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. Conditional formatting & data validation
    By EXCELsior44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2016, 10:25 PM
  2. [SOLVED] Conditional formatting adn data validation
    By JulijaKT in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-16-2015, 08:12 AM
  3. Conditional Data Validation/Formatting
    By BWellman in forum Excel General
    Replies: 1
    Last Post: 03-30-2014, 02:30 AM
  4. conditional formatting/data validation?
    By 13lack13lade in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2013, 10:47 PM
  5. data validation and conditional formatting
    By ennzo in forum Excel General
    Replies: 4
    Last Post: 12-05-2010, 07:51 PM
  6. Data Validation and Conditional Formatting using VBA
    By ABabeNChrist in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-30-2010, 03:53 AM
  7. Conditional Formatting/Data Validation?
    By 1230dc in forum Excel General
    Replies: 2
    Last Post: 10-07-2009, 05:38 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