Data log - sorting for two parameters and divide up in intervals. Plot specific log files

Jharming

New Member
Joined
May 28, 2014
Messages
16
Hi,

First time here and just started to look into Excel and VBA due to new challenges.

The deal is:

I have a data series measuring over time. (x-axis)
To this series I have 20 something temperatures loggers. Two of those temperature loggers measuring parameters I want to sort for.
e.g.

I measure over 5 hours.
The two parameters i set I can be changed during this time period.

First hour Tm=50, Ta=70
Second hour Tm=70, Ta=70
Third hour Tm=90, Ta=70
Fourth hour Tm=90, Ta=50
Fifth hour Tm=70, Ta=40

The logger logs 20 other temperature measurements.

What I want to do is to have a chart where I can choose which loggers I want to see and which set points.

To do this I have written a basic VBA code where I simply hide/unhide the rows and columns I want to see by using TRUE/FALSE checkbox.

To make this work I need to look into the data first and determine manually when Tm, Ta or both changes and write down the specific row.
I have written in the name for each checkbox Tm and Ta. Furthermore I have written for each other logger a checkbox that hide/unhide the specific logger.



I am sure this can be done much more convenient by inspecting the Tm and Ta using an algorithm and thereby extract the rows and values (average) for Tm and Ta and set them in the checkboxes.
 
Just one more thing.

I prefer that when I check a box that I can see the values/graph. This means that I would need the opposite value because of entirerow.hidden hide the rows when TRUE.
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
The cell referenced by .Cells(.Rows.Count,1) is the last cell in column 1 (A), rather than hardcoding a number (65,536 for excel 2003 or 1,048,576 for later versions) .Rows.Count references the last row no matter what version is being used.

.End(xlUp) moves from that cell up to the first filled in cell in that column (assuming that the bottom cell was empty).
You end up with the same cell address as if you selected the last row and then pressed End followed by the UpArrow key

Similarly
Cells(1,Columns.Count).End(xltoLeft)
gets you the same cell as selecting the last column in row 1 then pressing End and the LeftArrow key

Both of these methods will fail if the row (or column) is completely full. That happened to me 1 in Excel 2003 (with only 256 columns) and I
watch for that problem if my data can approach the row or column limit.

lLastCheckBoxDataRow = .Cells(.Rows.Count, 1).End(xlUp).Row
returns the rows of the last filled cell in column 1

Range("A" & .Cells(lX, 3).Value & ":A" & .Cells(lX, 4).Value)

if row 4 contained 66 in the column C and 132 in column D then when lX = 4 the above formula would evaluate to
Range("A66:A132")
 
Upvote 0
Ok, now it works as I wanted it to have.

I want to say thank you for the great help you offered. I now understand much more and enough to say that next steps would be to buy a book about VBA.

/Jakob
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,269
Members
449,093
Latest member
Vincent Khandagale

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