Sumproduct ?

Tikey

Board Regular
Joined
Jan 30, 2014
Messages
148
Office Version
  1. 2021
Platform
  1. Windows
Hi

I have a column of dates which cover several years in the format 01/01/2018, this column is modified with dates added to and removed regularly. I wish to be able to search for a particular year and then sum all the dates in that year without counting the same date twice.

I have been trying SUMPRODUCT without any success, can anyone offer any guidance please.

Thanks.
 
I saw it just after I had sent my response.

I have tried using A2:A, but it doesn't like that. If I were to start my range on row 2 to avoid the header, is there a symbol that can be used as an infinite row number as I don't wish to specify one ie A2:A~?
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I saw it just after I had sent my response.

I have tried using A2:A, but it doesn't like that. If I were to start my range on row 2 to avoid the header, is there a symbol that can be used as an infinite row number as I don't wish to specify one ie A2:A~?

Hello again,

In order to have a dynamic range ... ( which adjusts itself as you add or remove data ...) you could test following :

Code:
=$A$2:INDEX($A:$A,COUNTA($A:$A))

Hope this will help
 
Upvote 0
Can I expand on my previous question to see if another scenario is possible.

Again searching thru a column to find those dates that match a particular year, but then summing the occurences of different values in another column ie

Col A Col B
1/1/2016 - 12
1/1/2017 - 13
2/1/2017 - 12
1/1/2017 - 12

So if I were to search for the year 2017, the answer would be 2.
 
Upvote 0
You are welcome ... :wink:

Let's go step by step ...

First:

1. Is your dynamic range working fine ...?

Second:

2. Can you explain how you are reaching 2 for the year 2017 ? Which Row ( 4 or 5 ) is not to be counted ?
 
Upvote 0
Hi

The dynamic range is working great, thanks.

I have tried to depict 2 columns, Col A date and Col B a value column. So doing the search for the year 2017 finds 3 years with associated values, 2 of these values are the same so the total number of different values would be 2.

Hope this is a bit clearer.
 
Upvote 0
Hi again,

Glad the dynamic range is now fully operational ... :wink:

By the way ... I do not know the size of your database ... but it seems to me you should try to Insert a Pivot Table ... :smile:
 
Upvote 0
Don't know anything about them, as far as I know I've never used one.

My databases vary in size but typically contain about 20000 rows and 20 columns.
 
Upvote 0
Don't know anything about them, as far as I know I've never used one.

My databases vary in size but typically contain about 20000 rows and 20 columns.

Re,

No doubt ... !!!

With the size of your database, you need a VERY efficient tool : the Pivot Table ...

Take a look at Debra's brilliant site :

https://www.contextures.com/xlPivot01.html

Hope this will help
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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
Back
Top