VBA: Pull data based on time frame from Raw data or pivot table to dashboard sheet column

JackJon

New Member
Joined
Nov 29, 2018
Messages
15

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi All,
To be more specific:-

I would like to capture the values/turns from either Raw data or Pivot table on this particular time frame as shown below.
How can i accomplish this task?
Please let me know.


e.g

StartTime = 4/12/2018 06:01:00
EndTime = 4/12/2018 17:59:00
 
Upvote 0
I've been cracking my head up for the past few days on solving this task.
If anyone have an idea, please share with us.
Thank you.
 
Upvote 0
I need to loop a macro to add X values of rows whenever it's being updated in the database to a column.
Is it possible?
Please help to assist.
Thank you.
[h=2][/h]
 
Upvote 0
This is what i have so far.
How can i sum up the values in C column(ENDTIME) under "RawData" following on this time frame?

I'm already out of ideas..


Sub test1()
Dim FDate As Range, FF As Range
Dim FVal As Range
Dim WkRg As Range
Dim WS As Worksheet

Const StartTimeNight As Date = #6:01:00 PM#
Const EndTimeNight As Date = #5:59:00 AM#
Const StartTimeDay As Date = #6:01:00 AM#
Const EndTimeDay As Date = #5:59:00 PM#
Const ValStg As String = "0"
Set WS = Worksheets("RawData")

With WS
Set FDate = .Cells.Find(What:="Time", After:=Cells(1, 1), LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext)

If (FDate Is Nothing) Then Exit Sub
Set WkRg = .Range(FDate.Offset(1, 0), Cells(Rows.Count, FDate.Column).End(xlUp))

Set FVal = .Cells.Find(What:=ValStg, After:=Cells(1, 1), LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext)
If (FVal Is Nothing) Then Exit Sub
 
Upvote 0
Dear Experts,
I really need your assistance on this task.
Please have a look and thanks in advance.

Tasks: 1). To pull current accumulated values in the column(ENDQTYMAIN) from database("RawData") WS to another WS("DASHBOARD") in the column(TURNS) based on criteria which would be STAGE column for both WS.
2). DASHBOARD WS under TURNS column will have the current accumulated values based on current time frame which will be from 12/9/2018 18:01:00 to 12/10/2018 05:59:00 and another time frame which will be from 12/10/2018 06:01:00 to 12/10/2018 17:59:00.
3). It will continue to loop for the next time frame and day.

601349d1544366351-vba-pull-current-accumulated-values-from-database-into-other-ws-dashboardnew.png


601350d1544366382-vba-pull-current-accumulated-values-from-database-into-other-ws-raw-data.png
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

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