07-16-2012, 08:39 PM
Hello,
I am in need of assistance to write a macros that completes all these steps listed below:
1.Count # of entries/pumps in sheet1
2.Look at sheets “North, South, East” (can be individually)
3.Find all dates (as stated in MTBR worksheet C2 & C3)) within specified time (For example July 11,2011 – July 11,2012)
4.Then find if any pumps under the heading ‘equipment #’ match the ones in sheet1 (sheet1 headers are divided like this “north:equipment #’s, south:equipment #’s , east:equipment #’s etc.)
5.When it finds one, mark it as 1 failure depending on the sub-heading (HCU,HCF,HDA) the entry was found under, which are located on cells G3,5,7,9,11,13,15,17,19 for North; cells G3,5,7,9,11,13,15,17,19 for South; and cells G3,5,7,9,11 for East; it will add 1 to that # each time it finds a new one. And after its done that, the total number (based on each sub-headings values added together) for each sheet will populate cell G2.
6.Once that’s done for each worksheet, get it to go to MTBR sheet.
7.And for the cells labelled “North MTBR, South MTBR, East MTBR, and Site MTBR” it has to calculate MTBR.
8.Using this equation:
a.North MTBR: G2 (In North Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
b.South MTBR: G2 (In South Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
c.East MTBR: G2 (In East Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
d.Site MTBR: =sum(North,South,and East MTBR totals)
I really hope someone can assist me as I know very little about writing code and this seems extremely difficult and I cannot do it by myself.
I hope I have provided enough information.
Thank You So Much!
I am in need of assistance to write a macros that completes all these steps listed below:
1.Count # of entries/pumps in sheet1
2.Look at sheets “North, South, East” (can be individually)
3.Find all dates (as stated in MTBR worksheet C2 & C3)) within specified time (For example July 11,2011 – July 11,2012)
4.Then find if any pumps under the heading ‘equipment #’ match the ones in sheet1 (sheet1 headers are divided like this “north:equipment #’s, south:equipment #’s , east:equipment #’s etc.)
5.When it finds one, mark it as 1 failure depending on the sub-heading (HCU,HCF,HDA) the entry was found under, which are located on cells G3,5,7,9,11,13,15,17,19 for North; cells G3,5,7,9,11,13,15,17,19 for South; and cells G3,5,7,9,11 for East; it will add 1 to that # each time it finds a new one. And after its done that, the total number (based on each sub-headings values added together) for each sheet will populate cell G2.
6.Once that’s done for each worksheet, get it to go to MTBR sheet.
7.And for the cells labelled “North MTBR, South MTBR, East MTBR, and Site MTBR” it has to calculate MTBR.
8.Using this equation:
a.North MTBR: G2 (In North Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
b.South MTBR: G2 (In South Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
c.East MTBR: G2 (In East Worksheet)/ # of pumps installed (based on the count total it did at the beginning in sheet1) * difference between dates/365 (dates are found in C2 & C3)
d.Site MTBR: =sum(North,South,and East MTBR totals)
I really hope someone can assist me as I know very little about writing code and this seems extremely difficult and I cannot do it by myself.
I hope I have provided enough information.
Thank You So Much!