Data Manipulation, Hourly Basis (1 Viewer)

Peter Quill

Member
Local time
Today, 12:57
Joined
Apr 13, 2023
Messages
30
Hello,

I am attaching a file that has certain readings every hour daily. I want to find out how to calculate no of hours when

1. FT1003 (Column C in SO2 Sheet) value was increasing
2. FT1003 (Column C in SO2 Sheet) value was not increasing
3. P101 (Column D in SO2 Sheet) value was "TRUE"
4. P101 (Column D in SO2 Sheet) value was "FALSE"

Kindly help me to calculate the data,

Regards.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:57
Joined
Feb 28, 2001
Messages
27,383
If you want to calculate something based on times, you need to store the times either by getting parameters from the file itself, or from the file's date-modified property, or take a timestamp.

You say you are attaching a file hourly. That statement is confusing due to the many ways you can "attach" something in Access. Did you mean that you are importing the file and appending its contents to a table? Or is this some type of OLE import? Or does it mean that you are simply storing the files separately in some dedicated folder?

We are happy to have people in the forum who ask questions, but you need to learn to give more context when you ask us. Questions like this are VERY hard to answer without knowing a bit more of the mechanical operations associated with attaching your file.

I'm pretty sure the answer to your question isn't that hard, but I have no idea of what we have to work with, so I can't help you very much. Right now, it is like I am wandering around in the dark.
 

Peter Quill

Member
Local time
Today, 12:57
Joined
Apr 13, 2023
Messages
30
[File attached]
I am attaching a file that has certain readings every hour daily. I want to find out how to calculate no of hours when

1. FT1003 (Column C in SO2 Sheet) value was increasing
2. FT1003 (Column C in SO2 Sheet) value was not increasing
3. P101 (Column D in SO2 Sheet) value was "TRUE"
4. P101 (Column D in SO2 Sheet) value was "FALSE"

Kindly help me to calculate the data,
Regards.
 

Attachments

  • File.zip
    39.9 KB · Views: 91

Peter Quill

Member
Local time
Today, 12:57
Joined
Apr 13, 2023
Messages
30
Please find attached. I tried to give value as expected in Column E based on Column C value when it increasing or when it remains same to calculate no. of hrs

Hopefully, i explained

Regards.
 

Attachments

  • File (1).zip
    33.4 KB · Views: 80

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:57
Joined
May 7, 2009
Messages
19,248
check if this is what you need.
 

Attachments

  • File.zip
    40.7 KB · Views: 75

Peter Quill

Member
Local time
Today, 12:57
Joined
Apr 13, 2023
Messages
30
check if this is what you need.
Thanks for your help & support. Can u please explain the Function block you made? When i try to change the range, it is giving me error. Moreover, it is possible to make the function dynamic (Means if i delete the row in range or add any new row in range, it will update the function itself). Much much appreciation btw.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 14:57
Joined
May 7, 2009
Messages
19,248
on VBA, i added Change event on SO sheet to "force" calculate.
 

Attachments

  • File.zip
    42.1 KB · Views: 82

Users who are viewing this thread

Top Bottom