[Solved] Use reference, not fixed date, in formula

Discuss the spreadsheet application
Locked
awascholl
Posts: 69
Joined: Wed Dec 12, 2012 9:40 pm

[Solved] Use reference, not fixed date, in formula

Post by awascholl »

I have this payroll spreadsheet that sums up payroll by month by using a date range. So far, I've entered the date directly into the formula, but I have to change it every year, so I'm hoping I can add the dates to a set of cells and then the formula can reference the cell that has a date in it. However, I've been tinkering with this and it isn't working.

The yellow highlighted cells have the dates directly in them, and the orange highlighted cell is referencing a set of cells, also highlighted orange, but not working.

Am I doing something wrong, or is this method not possible?
Attachments
Payroll.xlsx
Warning: This XLSX attachment may crash OpenOffice -- MrProgrammer, forum moderator
(17.29 KiB) Downloaded 98 times
Last edited by MrProgrammer on Wed Apr 29, 2026 6:31 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Unspecified version of OpenOffice/LibreOffice. Unspecified operating system.

awascholl needs to update their → forum signature ← (click the link) if they expect to receive appropriate advice for their environment.
-- MrProgrammer, forum moderator
FJCC
Moderator
Posts: 9644
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Trying to make a formula reference a date in a cell vs putting the date in the formula

Post by FJCC »

You can use syntax like the following formula.

Code: Select all

=SUMIFS($Data.$D$2:$D$629; $Data.$C$2:$C$629; ">="&Q9; $Data.$C$2:$C$629; "<="&R9)
Notice the cell references are outside of the quotation marks and concatenated with an ampersand.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Locked