ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Syntax Again... (https://www.excelbanter.com/excel-discussion-misc-queries/454961-syntax-again.html)

dpb

Syntax Again...
 
What's wrong with

=SUMIF(G1:G10,"DATE(2020,2,18)",J1:J10)

Returns 0, no error

=G1DATE(2020,2,18)

in K1 returns TRUE/FALSE depending on the value in G1; the values in
column G are dates, numeric values nonzero in column J

--


Claus Busch

Syntax Again...
 
Hi,

Am Tue, 6 Oct 2020 19:25:56 -0500 schrieb dpb:

What's wrong with

=SUMIF(G1:G10,"DATE(2020,2,18)",J1:J10)

Returns 0, no error


you must add a function with an ampersand:
=SUMIF(G1:G10,""&DATE(2020,2,18),J1:J10)


Regards
Claus B.
--
Windows10
Office 2016

dpb

Syntax Again...
 
On 10/7/2020 2:44 AM, Claus Busch wrote:
Hi,

Am Tue, 6 Oct 2020 19:25:56 -0500 schrieb dpb:

What's wrong with

=SUMIF(G1:G10,"DATE(2020,2,18)",J1:J10)

Returns 0, no error


you must add a function with an ampersand:
=SUMIF(G1:G10,""&DATE(2020,2,18),J1:J10)


That documented anywhere, Claus?

Thanks...

--



Claus Busch

Syntax Again...
 
Hi Duane.

Am Wed, 7 Oct 2020 06:55:32 -0500 schrieb dpb:

That documented anywhere, Claus?


I didn't see it anywhere.

You don't need the ampersand if you insert the date as string:
Use:
=SUMIF(G1:G10,""&DATE(2020,2,18),J1:J10)
or
=SUMIF(G1:G10,"18.02.2020",J1:J10)


Regards
Claus B.
--
Windows10
Office 2016


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com