Changing cell color with button or check box click & importing data from one worksheet into a master summary.

L

Legacy 287428

Guest
Good morning,

Operating System: Windows Vista, 7, 8.
Excel Version: 2010

I am new to the forums here, and have been working on a spreadsheet which users would input time on and would also act as a cumulative time card. I have so far had a fair amount of luck with creating a spreadsheet that duplicates itself weekly, with the previous weeks information. But, I have reached the limits of my excel knowledge.

The Goal: Have a click-able item (button, or check box) which when unselected would have a number of cells (say 8 cells in a row) highlighted in a color (green), then upon the selection of the button, or check box, would change the cells color to the standard white of a spreadsheet. The second goal would be to take data from a cumulative total and import it based on a unique identifier into a master summary sheet (Everything mentioned here would be in one workbook, but would have a sheet per week (52 total sheets a year).

The Problem: I have made buttons, but have not been able to use a button to trigger an event such as cell color change. Likewise I have created summaries for a fixed number of pages, but not for a increasing number of pages.

Thank you for your help & let me know if more information is needed!
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
From what I can understand this would require some VBA code for you buttons. And for that some criterias are needed.

What/who would set some of the cells green? And what would that be the criteria for moving/importing? ("The unique identifier")

Changing the color is simple enough.

Some example code for you:
Code:
Sub color()

'this sets the color as white, (not no-color as standard spreadsheet)
    Cells(3, 1).Interior.color = RGB(255, 255, 255)
'this sets the cell color as green
    Cells(4, 1).Interior.color = RGB(0, 255, 0)
' Used in an if statement
If Cells(4, 1).Interior.color = RGB(0, 255, 0) Then
    Cells(4, 2) = "green"
End If
End Sub
 
Last edited:
Upvote 0
Thank you for your help! I am attaching a stripped down version of what I'm working on to see if that can help clarify points.

Per the first question, the individual filling out the sheet would select the button to change the cell color to green, so if the button is not selected, the cells would be green, if they are selected they will be white.

Per the second question; each unique identifier has a string of numbers, and a title associated with it, thus (noted in green on the document) upon creation of a new number not already present on the summary sheet, its data (number and name and any time associated with it) would be imported.

I think where it was getting tricky for me is that each week on Saturday the workbook would replicate itself so the summary page would have to recognize a new sheet, and import any new projects added as well as perform all functions as the previous week. Hope this makes sense?

Thank you for your time!

**I can not add images or the excel file at this time (no option to upload anywhere) My apologies**
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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