Macro to change dataset based cell selected

Abrandon73

New Member
Joined
Dec 22, 2010
Messages
1
I have one button at the top of my page that I would like to assign a Macro to but my little brain can't grasp how to do it. Please help...<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
My goal is to find out how many hours per month a motor has been running on a particular piece of equipment. I have a data set that is created everyday named by the date. Actually it is a csv file. The files are put in the current year folder. There is one column that either shows a positive value if the motor is on or a zero if it is off. In my main excel spreadsheet I have a column of months; for example January 2010, February 2010 etc... I would like to select any month, hit the button at the top of the page, go to the correct folder, find a particular range of cells, add up the time and return me an hours/min number.<o:p></o:p>
<o:p></o:p>
One final detail is that my data is taken every 5 min. So each cell represents 5 min.<o:p></o:p>
<o:p></o:p>
Is this too complicated or can anyone help??<o:p></o:p>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,944
Messages
6,122,387
Members
449,080
Latest member
Armadillos

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