PDA

View Full Version : Another Conundrum



paleaux
08-12-2011, 02:34 PM
Same workbook (attached)

"Timesheet" Column N - Total Hours is populated when I run the code.
The cells in Column N have conditional formatting in them that will turn the cell in Total Hours Red if the time entered by a timekeeper in
H2, J2, L2 are Greater than the populated amount in N2.

What I need to do is insert a yes/no check box in A2:A300 with an IF Statement that says
IF checked yes, then Sum H2,J2,L2 and Total them in N2 but also turn the cell Green.
IF checked No then keep the populated total the same and keep the cell Red.
I hope I explained this properly. See attached.
This is very important so any help is as always appreciated.

Thanks,

Bob Phillips
08-13-2011, 02:30 AM
Try this

paleaux
08-13-2011, 07:32 PM
couple of issues, the initial code is run via $ in the menu bar
This will copy the "Gate Log" into the "Timesheet"
the column "Total Hours" has a conditional format to turn the cell Red when a timekeeper enter values into the STHours,OTHours, and DTHours rows for that particular persons time, if those totals are greater than the
populated total hours then the cell will turn Red and the total of sthours,othours and dthours will not calculate into the Total Hours cell. but wrather will remain at the populated value.
what Iam trying to do is place a check box in "Murphy Approval" column
that when checked will allow the timekeepers entry to calculate into the
"Total Hours" cell over riding the populated value from the initial code and turn the cell Green reflecting that it has been approved.


I truly appreciate all of the help I am getting here and I am learning.

paleaux
08-15-2011, 08:01 AM
up !!

Aussiebear
08-15-2011, 04:26 PM
couple of issues, the initial code is run via $ in the menu bar
This will copy the "Gate Log" into the "Timesheet"

Does this above section still work correctly? Just what exactly does get copied from Gate Log to TimeSheet? (Employees name, Date, Total Hours?)



the column "Total Hours" has a conditional format to turn the cell Red when a timekeeper enter values into the STHours,OTHours, and DTHours rows for that particular persons time, if those totals are greater than the
populated total hours then the cell will turn Red and the total of sthours,othours and dthours will not calculate into the Total Hours cell. but wrather will remain at the populated value.

I am confused with your description here and the formulas applied in the workbook.

I am assuming that you are trying to test the sum value of ST_Hrs + OT_Hrs + DT_Hrs against the Total Hours value, and that the Total Hours value (Populated value) is linked to the Gate_Log Hours for this particular employee on a particular date.

If its not equal then the cell is formatted to turn red, else it remains a standard cell colour. Then once an approval is gained for the Total hours value ( by placing a tick mark in column A, the cell formatting turns green.

Is this correct?

paleaux
08-16-2011, 05:57 AM
Aussie thanks for the reply, here is perhaps a better explanation..

Here is the issue currently I have vba copying a criteria into the "Timesheet"
from another sheet "Gate Log"
Works fine with no issue...
Cells in O2:O300 have conditional form at that, if the manually entered time in
I2,K2,M2 are greater than the value in O2 (populated by vba) then O2 will turn Red and will not Total the hours from I2,K2,M2 in O2.

What I need is another condition.
Check Box located in A2, if check box is checked, then Sum I2,K2,M2 in O2 and
turn Green.

Problem is I can not get this to work.
I don't know if this will have to be driven via:vba or if it can be done thru conditional formatting. I have tried every I know about conditional formatting
and nothing seems to work, so I beginning to think that the vba is over riding the
conditional format and not allowing it. But once again I am basically a novice and am unsure of this. I have read almost every post on conditional formatting and still I am stuck.

any advise, is appreciated...

Aussiebear
08-16-2011, 02:43 PM
We are going round in circles again....

Aflatoon
08-17-2011, 06:50 AM
Not only here but also at the Code Cage here (http://www.thecodecage.com/forumz/members-excel-vba-programming/209711-2-color-conditions-one-cell-2.html).

Simon Lloyd
08-17-2011, 08:35 AM
Please read the link in my signature with regards cross posting!