Need help with a complex loop

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
Here's what I have:
A small workbook (5 rows) and a big workbook(4000 rows)

Small: Big:

Date Type Total Date Type Total
11-01-05 C560 3.0 08-06-05 C560 1.5
11-05-05 1125 2.0 09-10-05 C560 3.0
? ? ?
? ? ?

I am trying to get Excel to do this on the big workbook:

-Look at the cell (date A1) above it and compare with the date on the first row from the small workbook.

-If the date is different, then copy all the data in that row from the small workbook and transfer it to the big workbook

-If the date is the same, go to the next row in the small workbook and do the same comparison/work.

-Continue to do this until all the data on the small workbook has been transfered (only 5 rows). All the other cells in the big workbook could then be blank.

-I am going to erase all the data in the small workbook each time it gets filled up, then start over with new data. I am trying to get the big workbook to remember all the old data and just continue to add data to new rows.

Thank you so much for your help. This one is driving me nuts trying to figure out. I need HELP!!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Sorry. I thought that maybe my second post was a llittle more clear. I should have stated that.
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,739
Members
449,050
Latest member
excelknuckles

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