Getting sum total based on date input

gd6noob

Board Regular
Joined
Oct 20, 2017
Messages
170
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Im trying to get the sum total based on the Date input at D3 here is my formula =SUM(INDIRECT("Data!"&ADDRESS(MATCH($C5,Data!B:B,0),MATCH($D$3,Data!$1:$1,0))&":"&ADDRESS(MATCH($C6,Data!B:B,0)-1,MATCH($D$3,Data!$1:$1,0))))

The problem Im facing, in this example, the Data tab is auto pulled from the web and my formula only works if the Date remains on row 1 and the sports remain in column b.
On my actual workbook, the site Im pulling data from, does not allow me to select which part but the whole page, like I normally can with most other sites. The actual data wont fall under these conditions and will in different rows and columns.
Is there another way to do this?

lgfLEqk.jpg
RTKBNR2.jpg


 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi Gd6noob,
If your data is at a random spot in the sheet, you probably first need a function (or two) to find out where the data starts. You could use a couple of MATCH formulae to e.g. find "Hockey" if that's a good indicator of where your data starts. You could then use that found row/column to build your formula. By the way: the OFFSET formula also allows you to select a region (width & heigth are two parameters).
Generally speaking I would try to build some VBA to pull in the data on a fixed location, that makes life so much easier :).
Hope those pointers help,
Koen
 
Upvote 0
Hi Rijnsent,

The data in the Data tab doesnt always come to a random spot, its in a fixed location further down, row 396, but my formula, for some reason needs to be in this row/column. Ive tried to manipulate it but returns a #N/A error.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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