Maccros in my database are accidentally removing some information

Domroy

Board Regular
Joined
Mar 8, 2018
Messages
114
I have a database that I built, with the help of someone who is no longer with me. We built this tool wherein I have a massive "Active Listings" tab. The macro "Filterit" looks at the individual tabs in the workbook (ABHM, BAD, BENZ, BIRCH...etc), filters column "D" on Active Listings by that prefix, and copies and pastes that data onto the tab with the prefix.

Unfortunately, I have data in rows 1 and 2 of those sheets, and this is supposed to place the data in row 3. It does place it in row 3, but it somehow deletes all my data in rows one and two in the process. The macro is a little more complicated than I am good with. Can someone help me? Happy to put the file up somewhere?

Judi
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi Judi,

Upload a sample of your file to a free file sharing site such as ge.tt or Drop Box then post the link to your file back here. Make sure that it is an exact replica of your actual work book with dummy data and only a dozen or so rows of data per sheet. Ensure that your current macro is included also.

Someone should then be able to help you.

Cheerio,
vcoolio.
 
Upvote 0
Hi Judi,

You should only need to change this line:-

Code:
 Dest.CurrentRegion.ClearContents

to

Code:
Dest.CurrentRegion.Offset(2).ClearContents

The top two rows should then be safe.

I hope that this helps.

Cheerio,
vcoolio.
 
Upvote 0
Wow. That saves me a TON of time. THANK YOU!

OK, next question. I have a rudimentary macro built in there to take the data and create a "data table."

I'd love to be able to run it so that it takes the copied range (which no longer deletes my data), and run that macro on each tab where there is data. Problem is, somewhere in that macro, I think it tells it what to label the table, instead of just saying Make a table. Maybe we could change it so that it makes a table, and labels it the same name as the tab name? Then might it be easier to run that "Data Table" macro on all the tabs instead of doing it one at a time?

Thank you so much!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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