Macro to cut/paste/delete

B

Betty Csehi

I have a large database where I need a macro (or something) to find specific
information, cut it from its current row, and then paste it somewhere the
database. For example, the original database now looks like this:
A
1 #N/A
2 #N/A
3 GBA4326
4 #N/A
5 SLGG24

I want to find everything that is NOT #N/A, cut it and paste it below the
current database. So, with my example above the info below the original
database will now look like this:
A
1200 GBA4326
1201 SLGG24

and the original database will now look like this:
A
1 #N/A
2 #N/A
3 #N/A

I hope you get the gist of what I need. If anyone can help, I'd certainly
appreciate it as my database is over 1,000 rows. Thanks!
 
B

baxybaxy

insert a column and add a formula =row() for every record - copy this
data and save as values

set up a filter on the database

select custom filter - is not equal to #N/A

cut the records out you don't want and paste below

remove the filter

sort the original records by original row number
 
B

baxybaxy

insert a column and add a formula =row() for every record - copy this
data and save as values

set up a filter on the database

select custom filter - is not equal to #N/A

cut the records out you don't want and paste below

remove the filter

sort the original records by original row number
 
D

Dave Peterson

Maybe you can just apply Data|Filter|autofilter to that column.

Then apply a custom filter of not equal to #n/a and copy the visible cells/rows
to where you want them.
 
Top