Create a Sum Formula Based on Colored Cells in a Column

snork79

New Member
Joined
May 29, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi! I'm a complete newb when it comes to macros and VBA. Have no idea what I am doing. I've tried watching some videos and looking at other resources/answers here and other places, but I'm a dunce I guess. I want to track my hours worked and I want to color a cell where I take vacation (PTO), then at the bottom I want to have a formula that will add just the colored cells. I don't think I can do it with conditional formatting, or I haven't found out a way to do it, where it doesn't include other "8" hour days. Help a girl out, please.

1717002215485.png
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the forum. Are you coloring the cells manually or with Conditional Formatting? If you are coloring them manually, then you would need to use VBA or define the conditions for coloring the cells and maybe a formula could be worked up for you. If you are using Conditional Formatting, then you can use the same formula conditions that determine which cells to color to get the sum.
 
Upvote 0
Welcome to the forum. Are you coloring the cells manually or with Conditional Formatting? If you are coloring them manually, then you would need to use VBA or define the conditions for coloring the cells and maybe a formula could be worked up for you. If you are using Conditional Formatting, then you can use the same formula conditions that determine which cells to color to get the sum.
Manually. I know I need to use VBA, but I'm not sure what code to write. I've been looking at videos and other tutorials, but I'm a little clueless.
 
Upvote 0
Is there a method to determining which cells you highlight?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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