Adding data in cells (C1:C1000) if corresponding cell A is before Today()??

Timthetoolman

New Member
Joined
Jan 8, 2014
Messages
2
Gday all,

I am relatively inexperienced with VBA, but not too bad with excel, and I am trying to create a holiday leave sheet for my company. I am using Excel 2013

I cannot attach anything yet, but am happy to email a test sheet with actual leave applications.

I have used the networkdays function to calculate the days between two dates (A9:B9), in C9, and then a simple sum to add all the days for annual leave in the resulting c column.

What I need to come up with is a function or something to add all the days in column A, if the corresponding date in column A is before today's date.

Essentially adding all the days actually taken, and not the future dated ones.

Any help or advice would be great.

Tim
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

alvin-chung

Active Member
Joined
Nov 24, 2013
Messages
361
Welcome to the forum!
Is this what you're looking for?

Code:
=SUMIF(A1:A1000,"<"&TODAY(),C1:C1000)
 

Watch MrExcel Video

Forum statistics

Threads
1,130,186
Messages
5,640,688
Members
417,161
Latest member
Devon150

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
Top