Macro to find, pull and input data into a different spreadsheet

docjackson33

New Member
Joined
Feb 7, 2010
Messages
18
Hello All,

My issue is doing analysis w/in a tight timeline, and before that can be done, the Main spreadsheet must first be updated by hand. Being that this spread sheet is comprised of over 50 different MOS types, x6 companies, it becomes very tedeous and time consuming. I have finally added a formula that will pull the additional gains =COUNTIF('Gains'!$D$2:$D$30,A11) and losses =COUNTIF('Losses'!$D$2:$D$8,A2) (from different tabs) into this spreadsheet. My goal is to have a macro do this, because there may be a variable that would cause me to remove the formula from that cell. I've attempted to use jeanie and show the 3 phases of my head ache, but no avail. Sorry, here's what I need. I need the macro to look in the "gains tab" to find all of the MOS(s) listed in the "MOS" column, by "Unit", by "Report Dt" (note: this is the date format20100616). With that, I need it need only grab MOS(s) w/in 120 days of the present month, eg. there are x3 21B, but only two have a report date before Nov 10 or 20101116, so it will go to the "Main spreadsheet" find the apropriate "Unit", and "MOS"(21B, 74D, etc) and input the number 2 in the gains column under the apropriate company and to the right of that MOS. And then repeat the same action for the "Loss" tab and column. I hope this is understandable.

Thanks in advance...

Jonathan

"Living the Army Dream"
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

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