Search across numerous worksheets, in my workbook, to find a matching date to populate cells in the active worksheet - Macro

Kimberlieh

New Member
Joined
Mar 5, 2011
Messages
12
Background information:<o:p></o:p>
About every 6 months the Fed and State wage and hour divisions publish a new wage rate booklet specifying the required pay rates per work classification. I am using Microsoft Office Professional 2010 and with each new publication since 2009, I have been creating a new Excel worksheet, within my existing payroll workbook, by copying the previously created worksheet and naming the new one with the month and year, to reflect the publication date. Then I make any necessary changes so my sheet matches the publication. Then each subsequent bid letting I add the bid date in column “B”, which is labeled “Bid Date” then in the same row I enter the “Appendix” pay rates in columns C:L for both Fed and State per work classification. Currently I only have (2) work classifications on my publication sheets so if additional work classifications are added, additional columns beyond “L” will be inserted, however, since there are so many more classes, I will have to find another way to work with the data. <o:p></o:p>
Macro, for Microsoft Office Professional 2010, needed to accomplish task:<o:p></o:p>
I have struggled with numerous approaches trying to develop ways to have the process automated and though I am grateful for what I have learned so far, I am finally giving up, swallowing my pride, and asking for help to get a macro to do the job for me… Since calculating pay rates gets a bit complicated, the following is the flow of events needed, from a macro, to get pay rate information for my worksheet. <o:p></o:p>
· User enters <o:p></o:p>
a. The Bid Date in the active worksheet, “Project Info”, in column “L”, which is labeled “Bid Date” and the Project Class, i.e. “BOLI” or “Fed Aid” in column “M”, which is labeled “Project Class”. <o:p></o:p>
· Macro <o:p></o:p>
a. Look across column “B” “Bid Date”, in all the previously mentioned publication worksheets and find the match for the “Bid Date” the user entered in the “Project Info” worksheet.<o:p></o:p>
· Macro <o:p></o:p>
a. Determine the “Pay Calculations” for each work group, in this case column “R”, (Row count 5 from the “Pay Calculations” column of each work group of the “Project Info” worksheet), the “Base Pay Rate” and the “Fringe Rate”.<o:p></o:p>
i. If the Project Class is “Fed Aid”, look at the “county”, in column “K” of the “Project Info” worksheet, labeled “Project County”, and find the same county on the previously identified publication worksheet in column “O”. With the match, in say for example, “O28”, if “P28” = “Appendix” then after again matching the “Bid Date” in the publication worksheet in column “B”, in the same row, compare the “BOLI Pay Rate” in column “I” + “BOLI Fringe Rate” in column “J” against the “DB Pay Rate” in column “E” + “DB Fringe Rate” in column “F”. - Whichever result is greater; “BOLI” or “DB” will populate the “Project Info” worksheet with “BOLI” or “DB”. In the cell, in column “N”, Pay Calculations”, the “Base Labor Rate” amount and in column “S”, and the “Fringe pay rate” in column “U”. <o:p></o:p>
ii. If the Project Class is “Fed Aid”, look at the “County”, in column “K” of the “Project Info” worksheet, labeled “Project County”, and find the same county on the previously identified publication worksheet in column “O”. With the match, in say for example, “O28”, if P28 is a pay rate amount, then locate the “Bid Date” in the publication worksheet in column “B” again, and in the same row, compare the “BOLI Pay Rate” in column “P” + “BOLI Fringe Rate” in column “Q” against the “DB Pay Rate” in column “E” + “DB Fringe Rate” in column “F”. - Whichever result is greater, “BOLI” or “DB” will populate the “Project Info” worksheet. “BOLI” or “DB” in the cell, in column “N”, Pay Calculations”, the “Base Labor Rate” amount in column “S”, and the “Fringe pay rate” in column “U”.<o:p></o:p>
iii. If the Project Class is “BOLI”, look at the “county”, in column “K” of the “Project Info” worksheet, labeled “Project County”, and find the same county on the previously identified publication worksheet in column “O”. With the match, in say for example, “O28”, if P28 is “Appendix” then after again locating the “Bid Date” in the publication worksheet in column “B”. Populate the “Project Info” worksheet with “BOLI” in the cell, in column “N”, “Pay Calculations”, and the “Base Labor Rate” amount in column “S”, with the “Fringe pay rate” in column “U”. <o:p></o:p>
iv. If the Project Class is “BOLI”, look at the “county”, in column “K” of the “Project Info” worksheet, labeled “Project County”, and find the same county on the previously identified publication worksheet in column “O”. With the match, in say for example, “O28”, if P28 is a pay rate amount. Populate the “Project Info” worksheet with “BOLI” in the cell, in column “N”, “Pay Calculations”, the cell in column “S”, “Base Labor Rate” from the publication P28 in column “S”, and the cell in column “U”, “Fringe pay rate”, from the publication Q28.<o:p></o:p>
Once the pay rate is determined for the Labor, the next pay group’s rate needs to be found and so on until all the pay group rates for the project are populated on the “Project Info” worksheet. <o:p></o:p>
The following columns are used in all rate calculations<o:p></o:p>
· Column “L”, “Bid Date”<o:p></o:p>
· Column “M”, “Pay Calculation”<o:p></o:p>
· Column “K”, “Project County”<o:p></o:p>
The following columns are columns are how many are used per pay group<o:p></o:p>
· Column “N:U”<o:p></o:p>
· Column “V:AC” <o:p></o:p>
· The 5th column defines the pay group.<o:p></o:p>
Any help on this macro is greatly appreciated…<o:p></o:p>
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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