Calculating data based on Today date

syud_zack

New Member
Joined
Aug 4, 2010
Messages
3
hi all,

i'm new in Excel macro..

i'm facing the problem on calculating sum based on today date..

currently, i'm using this formula and it didn't work..

={SUM((Data!$B$5:$B$19696=TODAY())*(Data!$C$5:$C$19696=1)*(Data!$E$5:$E$19696=4))}

can any tell me, where's i'm wrong??
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,274
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Hi and Welcome to the Board
Have a look at SUMIF and COUNTIF instead of SUM
Maybe something like
Code:
=SUMIF(DATA!$B$5:$B$19696,TODAY())*SUMIF(DATA!$C$5:$C$19696,"1")*SUMIF(DATA!$E$5:$E$19696,"4")
 
Last edited:

syud_zack

New Member
Joined
Aug 4, 2010
Messages
3
i've tried SUMIF and COUNTIF before. but it keeps give me 0 for the calculation..

i don't know where i'm wrong
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,274
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Probably because the first part of your SUM is trying to sum the date.
Should you maybe be trying to COUNT the number of occurrences of Today ()
 

syud_zack

New Member
Joined
Aug 4, 2010
Messages
3
Very Satisfied 0
Fairly Satisfied 0
Neither satisfied 0
Fairly dissatisfied 0
Very dissatisfied 0
Total 0

i want to be able to calculate number of response based on those criteria. the raw data is on he other sheet name Data. it always give the wrong answer. i've try count as u mentioned, it give me wrong answer

=COUNT((Data!$B$5:$B$19696=TODAY())*(Data!$C$5:$C$19696=1))
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,274
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Ok, I'd suggest you post a small sample of your sheet with an expected result.
Also, Have a look at my previous posts regarding COUNTIF.....not COUNT
and SUMIF.....not SUM
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,588
Messages
5,832,610
Members
430,144
Latest member
bruno92

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