set range as today

tex1966

New Member
Joined
Mar 20, 2018
Messages
3
Hi all,

My sheet gets production numbers via a getpivotdata formula. That part works fine.
My problem is that the original Pivot is only valid for today and I need to track numbers for a whole year.

So I use getpivotdata to show me what we did today, but this only shows me what we did today. Yesterday is blank because there is no yesterday in the pivot table. That kills historical productivity data. I can't format the pivot to include data for the year because that would bog everything down.

I'm trying to get around this problem by hard-copying the results as only a value. I only want to do this in the row for today. All older dates should be ignored and the historical value remains unchanged.
Calendar dates are listed in Range A3:A367

So the question is: How can I set the range to only be for today?

My macro looks like this but I need to adjust the range part for the selection and copy. Any help would be appreciated.

Range("C3:C367").Select
Selection.Copy
Range("D3:d367").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Cheers
Tex1966
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
if you have all the historic data why not pull the info you want from that - show us a few rows of data and what output you want....
 
Upvote 0
I don't yet have the historical data as I'm building the file as we speak.

I can't figure out how to show rows of data. This forum isn't very flexible with things like inserting a table.

In Column A are dates
In Column B is the GetPivotData
In Column C I want to copy the data from Column B - but only if the date in Colum A is today. Otherwise nothing should be done as this data was provided yesterday

The "active" range should be for the cells with today's date.
i.e., Cell A100 has today's date. This cell should the be the active range.


Another way of doing this would be to find today's date and let the formulas in the related rows to be active. All previous dates would have the formulas removed and replaced with the values that were generated. I hope that I've explained this clearly enough.

Find today, use the formula.
Older than today, remove formula and replace with values.

cheers
 
Upvote 0
datedataextractiontoday=21/03/2018
20/03/201811
19/03/201817
21/03/20182323
20/03/201829
19/03/201835
21/03/20184141
20/03/201847
19/03/201853
21/03/20185959
do you want to add 23,41,59
or explain further in terms
of this example data

<colgroup><col><col span="4"><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
01/03/201804/03/201807/03/201810/03/201813/03/201816/03/201819/03/201822/03/201825/03/201828/03/2018
dept131231626101934341348
dept2493314324526025281
dept314394432915183542
13/03/2018
110
245
329
4
5
alternatively pull the column that matches the date in D8

<colgroup><col><col span="2"><col><col><col><col><col><col><col><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,845
Members
449,471
Latest member
lachbee

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