Check Box Formatting ??

B

Big Rick

Hello Everyone. Its me again.
Please can you help me with the following.

I have a workbook with 13 sheets in it. Name of first sheet is Holidays.
The others are named Apr, May, ......... Mar.
I would like to place a check box (if this is the right thing to use)on each
monthly sheet that would send the value of cell

Mar!I48 to Holidays!D13 and
Mar!I50 to Holidays!D17
in one operation.

If the check box is ticked the values of I48 and I50 should be transfered.
If not ticked the value should default to zero.
This is to be repeated on Apr, May etc obvioulsy to different cells on the
the Holiday sheet. (Apr I48,I50 to Holidays!F13,I50 and May I48,I50 to
Holidays H13,H17 etc)
Hoping you can understand all this because I wouldn't !

Please help me !!!
 
B

Big Rick

I dont understand your question, "what are the cells inbetween?", but I'll
try to explain differently.

At the end of every month I need to transfer the the value of 2 cells on one
sheet (number of monthly additional or shortfall hours worked) to 2 cells on
the Holiday sheet by the check box.(it cannot be an automatic process, it has
to be done with a user input)

Mar Sheet
Shortfall Hours
cell I48 = 0
&
Additional Hours
cell I50 = 25

to be transfered to

Holidays Sheet
cell D13 = MarI48 (which should be 0)
cell I50 = Mar D17 (which should be 25)

Hoping that this explains further.
Big Rick
 
M

Mangesh Yadav

Sorry,

I had not understood your question earlier. Select a checkbox from the
"Control Toolbox" (View | Toolsbars | Control toolbox). Place it is say
march sheet. Double click on it to go to design mode and enter the following
code

Private Sub CheckBox1_Click()

If CheckBox1.Value = True Then
Worksheets("Hol").Range("D13") = Worksheets("Mar").Range("I48")
Worksheets("Hol").Range("D17") = Worksheets("Mar").Range("I50")
Else
Worksheets("Hol").Range("D13") = 0
Worksheets("Hol").Range("D17") = 0
End If

End Sub


Repeat procedure for other sheets.

Mangesh
 
B

Big Rick

Brilliant, Fantastic, Wonderful, Superb, Magnificent, Breathtaking, Excellent.
It works a treat.

Please can you help me one stage further.
The value of I50 on each monthly sheet is a negative number. I want the same
number transfered, but as a positive number.
If you can help me again, I'll try and think of some other descriptions of
how utterly amazing you are !!
 
M

Mangesh Yadav

Use ABS

If CheckBox1.Value = True Then
Worksheets("Hol").Range("D13") = Abs(Worksheets("Mar").Range("I48"))
Worksheets("Hol").Range("D17") = Abs(Worksheets("Mar").Range("I50"))
Else
Worksheets("Hol").Range("D13") = 0
Worksheets("Hol").Range("D17") = 0
End If



Mangesh
 
M

Mangesh Yadav

Big Rick,

Jim's solution will change positive numbers to negative (while negative to
positive), if that is what you want, then use his solution. Whereas if you
want only positive numbers then use the one I posted.

Mangesh
 
B

Big Rick

Thank you. This amendment works, but I'm afraid I have discovered a problem.
The formula in the cells are

I48 =IF(SUM(I46)>($A$44*Holidays!S4),SUM(I46-($A$44*Holidays!$S$4)),"0")
I50 =IF(SUM(I46)<($A$44*Holidays!S4),SUM(I46-($A$44*Holidays!$S$4)),"0")

Holidays!S4 can be either 37.50 or 40
A44 can be either 4 or 5
This makes a working month of 150, 160 , 187.50 or 200 working hours.

I'm afraid that the number being transfered is always 160 in Holidays D17
Any chance of some more help !!
 
M

Mangesh Yadav

I am sorry. I am at a loss. I don't understand what you are doing. Maybe if
you explain in plain english what you want to do, someone could help.

Mangesh
 
B

Big Rick

I simply want to transfer two cells on on sheet to cells on another sheet.
The two cells on the first sheet are the result of a formula starting off at
150, 160, 187.50 or 200.
As hours are worked, the shortfall cell counts down until it reaches 0 when
the other cell (the additional hours) starts counting up from zero.

At the end of the month, I want to transfer the numbers to the holiday sheet.
This has be done with a user input, hence the check box.

Sorry to be a nuisance.
 
J

Jim May

Good point Mangesh; I took OP literally, when he said..

The value of I50 on each monthly sheet is a negative number.

Not enough coffee by the time I responded..
Thanks,
 
M

Mangesh Yadav

:)

Mangesh



Jim May said:
Good point Mangesh; I took OP literally, when he said..

The value of I50 on each monthly sheet is a negative number.

Not enough coffee by the time I responded..
Thanks,
 
M

Mangesh Yadav

No problem at all. Only thing was I didn't understand what those numbers
were and so could not help with 150 hours month. But still open if you need
help on this issue.

Mangesh
 
Top