Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenMon, 28 Aug 2017 16:41:36 +0200Sum up based on date in the same rowhttps://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/Hi there,
I'd like to sum up a column if and only if other column say so. I thought it could be done with SUMIF. My problem is that I have a sheet with dates on column A and values on column B and I am trying to do weekday report of progress...
My first try was something like this: "=SUMIF(B1:B100,WEEKDAY(A1)=3)". It is obivious wrong because it sums up all elements or it does nothing. I'd like when I try to sum up B2 I test B1 and not A1. Sum up B3, test A3 and so on.Mon, 28 Aug 2017 13:00:20 +0200https://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/Answer by JohnSUN for <p>Hi there,</p>
<p>I'd like to sum up a column if and only if other column say so. I thought it could be done with SUMIF. My problem is that I have a sheet with dates on column A and values on column B and I am trying to do weekday report of progress...</p>
<p>My first try was something like this: "=SUMIF(B1:B100,WEEKDAY(A1)=3)". It is obivious wrong because it sums up all elements or it does nothing. I'd like when I try to sum up B2 I test B1 and not A1. Sum up B3, test A3 and so on.</p>
https://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/?answer=127504#post-id-127504What about `=SUMPRODUCT(B1:B100;WEEKDAY(A1:A100;2)<6)`? This formula must calculate the sum of the values for all working days.
If you need data for each day of the week, then use `...WEEKDAY(A1:A100;2)=1` for Monday, `...=2` for Tuesday, etc.Mon, 28 Aug 2017 13:35:50 +0200https://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/?answer=127504#post-id-127504Comment by rrlucca for <p>What about <code>=SUMPRODUCT(B1:B100;WEEKDAY(A1:A100;2)<6)</code>? This formula must calculate the sum of the values for all working days. </p>
<p>If you need data for each day of the week, then use <code>...WEEKDAY(A1:A100;2)=1</code> for Monday, <code>...=2</code> for Tuesday, etc.</p>
https://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/?comment=127559#post-id-127559Thanks. Worked fine.Mon, 28 Aug 2017 16:41:36 +0200https://ask.libreoffice.org/en/question/127492/sum-up-based-on-date-in-the-same-row/?comment=127559#post-id-127559