Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Special Paste to Next empty row if new data and mark copied Macro

I've gained a ton of information from this forum already so thank you to
everyone.

I'm working with MS Excel 2003 and the workbook will be shared and
protected. Is there a way to also enclose a sample of it? This workbook
will be used and constantly updated 24/7 with new data.

Short Story: I'm trying to find a macro that will copy data from the areas
of B120:E179 and I120:K179 for example (linked to another worksheet within
the workbook) and special paste (Values Only and skipping blank cells) it to
the next available open cell up top where basic data entry will be taking
place B10:E29 and I10:K29. I need it to only copy/paste the rows with data
(skipping all cells/rows with no data) and once it is finished coping I will
need it to place an "X" in column M next to the row that it copied data from.
I would also need it to reference the data in each row from B to E and if
there is an entry say on B14 to E14 that matches it but if I10 to E29 are
blank then paste that information on row 14. If it does not match or if those
columns are full then paste on next available line.

I hope I'm making sense here. This is for a vehicle tracking log between
checkpoints. Each driver and info will be listed on each row. Columns B
through E will contain information for each driver: name, badge, #passengers,
and vehicle #. The log lists location, time, and destination for outgoing
travelers in columns F to H. Incoming info is listed on Columns I to K. I'm
trying to find a macro or some way to carry over the driver info and times
from one checkpoint to another and fill it in properly on the log while at
the same time not corrupting the conditional formats and that. Since this
log will be constantly updating and information being added, I set up the
referenced data in B120 and below that if an X is placed in column M then
that data will disappear preventing the macro from reading it and duplicating
it over and over on the log.

I understand this is a lot and possibly confusing so would enclose a sample
of the log and you can see what I'm trying to achieve if that were possible.
If I left out any crucial information or if you need to know more just ask
and I will reply with what you need. I did several searches and found some
examples however they did not fully answer or help me out. Thank you to
anyone willing to give me a hand on this one :)

Ranges:

B10:E29 and I10:K29
B44:E63 and I44:K63
B78:B97 and I78:K97 reference the incoming travelers on the current Sheet2

B120:E179 and I120:K179 reference the outgoing travelers from Sheet1

B182:E241 and I182:K241 reference the outgoing travelers from Sheet3

Order of Events:

1) Check B120:E179 and B182:E241 for any data. (Called B120 & Below)

If there is data

2) Reference each row of data individually with the data from each row from
B10:E29 and B44:E63 and B78:E97 (Called B10:E97)

If a Row of data (from B120:E179 and B182:E241) is the same data that
already exists within B10:E29 and B44:E63 and B78:E97 and columns I, J, K are
empty for that same row then

3a) Copy that same row of data from columns I, J, K (B120 & Below) and
Special paste (Values Only) to columns I, J, K in the B10:E97 Rows.

If the Row of data matches but the I, J, K columns from B10:E97 are not
empty then

3b) Copy the full row of data from columns B through E and I through K and
Special paste (Values Only) to the next empty Row in the range B10:K97.
Special Pasting Columns B to E and I to K (B120 & Below) to Columns B to E
and I to K (B10:K97) and so on.

For each Row of data that does not match up with data from the B10:E97
range.

4) Copy the row of data from columns B to E and I to K (B120 & below) and
Special Paste (Values Only) to the next empty Row in the range of B10:K97.
The data from one Column (B120 & Below) will be special pasted to the same
column (B10:K97) within the Row.

Once all the data has been Copied and Special Pasted or after completing
each row

5) Place an X in Column M for each row that had data copied and special
pasted (B120 & Below). This X in Column M will make that data disappear.

Now the Area of B120 & Below should be all copied and pasted to above log
and should now be empty with Xs in column M from all the rows that
previously had data.

It is important that the empty rows of B120 and Below be ignored through out
this process as they may receive data later on to have this macro run again
on them.

Also: that the Special Pasting pastes to the next available empty row, so
that there are no gaps in the log. Unless of course, it was able to paste
into a row of identical data as mentioned in numbers 2 and 3.

If anyone has an Easier/More effect way to update the other sheets outgoing
traveler info into this sheets incoming info Im open to any ideas. This
workbook will be updating with new travelers throughout the day.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set macro to Paste Special Value to next empty column [email protected] Excel Worksheet Functions 9 May 5th 08 11:57 PM
PASTE SPECIAL w/ Macro Jase Excel Discussion (Misc queries) 7 February 26th 08 06:06 PM
Excel Work Book Copied Into Word With Paste Special, Excel Workboo MAB Excel Discussion (Misc queries) 0 February 12th 08 06:59 PM
paste special / skip empty cells doesn't work!? Ivica TypeR Excel Worksheet Functions 3 July 10th 07 04:53 PM
Paste Special in a macro CMAC Excel Worksheet Functions 2 December 6th 04 10:19 PM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"