Conditional Formatting, a mind of its own, driving me nuts!

lPinkFloyd

Board Regular
Joined
Nov 22, 2003
Messages
92
I have a bizarre problem with my conditional formatting. First of all I have a sheet that has several time cards in it and the conditional formatting is working in all of them except one of them. The problem is occurring in

three of the cells. I am giving an example for only one set, but it is the same issue in the other two. The format conditions are as follows: Condition 1: If cell (xxx) value is = cell (yyy) cell color is none; Condition

2: If cell (xxx) value > cell (yyy) cell color is green; Condition 3: If cell (xxx) value < cell (yyy) cell color is red. The formulas that give me my value in cell (xxx) are correct. When I insert hypothetical data in the work

sheet to test the conditional formatting everything seems to be working, but when I enter the real data the conditional data starts acting up. For instance when cell (xxx) = (yyy) the color is red. There are three other

cells where this is happening.
I have deleted all data in these cells using delete contents, and redid the conditional formatting even going so far as to rearrange the order of the

conditions. I have double checked to make sure that I am referencing the correct cells. I did a copy from another section where the conditional formatting was working and changed the conditional formatting to make

sure I was referencing the correct cells. I tried using Format Painter and still am having the same problem. I deleted all the data and reentered it in the rest of the part of the sheet where the (xxx) gets its results from. It

seems like the main problem is with the less than part of the conditional formatting. I’ve looked around the forum but have not come across this issue. I have spent countless hours trying to make this work and as my last resort I am writing this. I know it is a long explanation for such what seems like a simple problem, but I am stuck. Using Windows XP and Office XP. Thanks
 
Re: Conditional Formatting, a mind of its own, driving me nu

How can L13 be less than L13 or am I reading it incorrectly.?

If L13 is the problem cell please post the actual conditional format formulas, so we can see if the problem lies there.
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Conditional Formatting, a mind of its own, driving me nu
MasterXL.xls
ABCDEFGHIJKL
5BCDEFGHIJKL
611Shift2-ClockIn8:00AM9:00AM$0.00?OTPay?$0.00
712Shift2-ClockOut12:00PM1:00PM$0.00?TotalPay?$0.00
813Shift2Hrs.4.004.000.000.000.000.000.008.00?OTHrs.?8.00
Sheet1


Ok what I got when I copied and pasted your post wasn't complete and my worksheet I suspect took some liberty with formats but here is how I got it to work on my end with some format changes.

Cells C11 thru I12 are formatted as TIMES
Cells C13 thru I13 should be formatted as NUMBERS and formulas should be
respectively C13 = (C12-C11)*24 This would give you the difference of 4 hours converting the serial times to decimal NUMBERS
J13 Formatted as a NUMBER would be the sum of C13 thru I13
and L13 should also be Formatted as a NUMBER

I suspect the problem you may be having is in the cells that you are calculating your hours. If formatted to NUMBERS not TIMES everything works
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Hi,

Can you do me a favour.

Enter cell J13 and hit F9
Do the same with L13

And post the results.

Regards
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Parry, I e-maild the workbook to egress1 Ken and hopefully he can come up with something. I have my e-mail posted in my profile so if you want to give it a crack, write me and I'll be happy to send it to you as well.
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Sorry gorD, you have a good eye. That was a typo error it should have read L13 < And > J13
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

egress, Actually J13 has nothing to do with the rest of row 13. That information is part of a formula using L13 where the overtime hours are derived from. The formula for J13 is =if (J13>40,J13-40,) and that part is working fine. L13 and J13 are formatted as numbers and there is no additional formatting in them except for the conditional formatting. There are several time cards like this in the worksheet and they are working properly. Hummm?
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

When I insert hypothetical data in the worksheet to test the conditional formatting everything seems to be working, but when I enter the real data the conditional data starts acting up.

The only thing that wasn't working was the unnamed worksheet where you moved your data to test. It appears that the conditional format was referencing the wrong cell. Instead of looking at J13 it was looking at $K$23. Other than that everything else I looked at appeared to be functioning properly. (Shrugs)
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Hello,

as I mentioned, if you'd Hit F9 in each of the Cells you would see a different number.

From your email:
Copy of Syl's Timecard.xls
BCDEFGHIJKL
630-Nov-0301-Dec-0302-Dec-0303-Dec-0304-Dec-0305-Dec-0306-Dec-03Wk.TotalsStore'sFigures
7Shift1-ClockInAvg./DayTotal$Diff.?$0.00
8Shift1-ClockOut7.00TotalHr.Diff.?0.00
9Shift1Hrs.0:000:000:000:000:000:000:00$61.14OT$Difference?$0.00
10Earnings$56.00$56.00$56.00$56.00$56.00$56.00$56.00$320.00?Reg.Pay?$320.00
11Shift2-ClockIn5.005.005.005.005.005.005.00$108.00?OTPay?$108.00
12Shift2-ClockOut12.0012.0012.0012.0012.0012.0012.00$428.00?TotalPay?$428.00
13Shift2Hrs.7:007:007:007:007:007:007:009.00?OTHrs.?9.00
14TotalHours07:0007:0007:0007:0007:0007:0007:0049.00?Total/Reg.Hrs?40.00
15
16=J13=L13
178.9999999999999909.00000000000000
Sheet2


Your may need to adjust your conditioning to include rounding the numbers
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Not fully tested but try the formula changes in pink:
Copy of Syl's Timecard.xls
BCDEFGHIJKL
623-Nov-0324-Nov-0325-Nov-0326-Nov-0327-Nov-0328-Nov-0329-Nov-03Wk.Totals
7Shift1-ClockInAvg./DayTotal$Diff.?$0.00
8Shift1-ClockOut7.00TotalHr.Diff.?0.00
9Shift1Hrs.0:000:000:000:000:000:000:00$61.14OT$Difference?$0.00
10Earnings$56.00$56.00$56.00$56.00$56.00$56.00$56.00$320.00?Reg.Pay?$320.00
11Shift2-ClockIn5.005.005.005.005.005.005.00$108.00?OTPay?$108.00
12Shift2-ClockOut12.0012.0012.0012.0012.0012.0012.00$428.00?TotalPay?$428.00
13Shift2Hrs.7:007:007:007:007:007:007:009.00?OTHrs.?9.00
14TotalHours07:0007:0007:0007:0007:0007:0007:0049.00?Total/Reg.Hrs?40.00
Time Card


They return 9.0 when you hit F9

Hope this helps

Regards
 
Upvote 0
Re: Conditional Formatting, a mind of its own, driving me nu

Here is the working version. The Formulas In Rows 20 & 24 changed.

Row 24 format was changed from (h:mm) to NUMBER with 2 decimal places.

Finally the Formula in J24 was changed to do a true SUM
Copy of Syl's Timecard.xls
BCDEFGHIJKL
1630-Nov-0301-Dec-0302-Dec-0303-Dec-0304-Dec-0305-Dec-0306-Dec-03Wk.TotalsStore'sFigures
17Shift1-ClockIn9.957.969.4415.0012.909.04Avg./DayTotal$Diff.?-$320.00
18Shift1-ClockOut18.1016.1518.5420.0020.0012.685.93TotalHr.Diff.?-40.00
19Shift1Hrs.8:158:159:150:005:007:153:30$48.29OT$Difference?$0.00
20Earnings$66.00$66.00$74.00$0.00$40.00$58.00$28.00$320.00?Reg.Pay?$0.00
21Shift2-ClockIn$18.00?OTPay?$18.00
22Shift2-ClockOut$338.00?TotalPay?$18.00
23Shift2Hrs.0:000:000:000:000:000:000:001.50?OTHrs.?1.50
24TotalHours8.258.259.250.005.007.253.5041.50?Total/Reg.Hrs?0.00
Time Card
 
Upvote 0

Forum statistics

Threads
1,214,807
Messages
6,121,679
Members
449,047
Latest member
notmrdurden

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top