Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Copy to Next Blank Row of Different Workbook

Hello,

I'm new to VBA so I need some help with the following. I have a working workbook and I want to dump all of the data into a master workbook in the next blank row. The working file will have a different number of rows of data, so I need the range to select the data in the working file based on what is in there (the range will start at B4). I think I need xldown and right?!

I've searched for an answer before posting but none of the other threads quite match what I need.

Thanks,

James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Copy to Next Blank Row of Different Workbook

Hi

.... (the range will start at B4). I think I need
xldown and right?!

I would say that you'd better start from xldown towards xlup. Just because, if you go the other way round, if there is an empty cell in your range, this will be your last row and you just might half way to the last row...


example of xlup

dim lastr as long
lastr = sheet1.cells(rows.count, 2).end(xlup).row

the number 2 means column 2 or column B.

Pascal Baro
http://multiskillz.tekcities.com/
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
when opening an Excel Workbook, another blank workbook also opens Gord Dibben Excel Discussion (Misc queries) 0 October 12th 07 09:49 PM
when opening an Excel Workbook, another blank workbook also opens spmu Excel Discussion (Misc queries) 0 October 12th 07 01:46 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Excel Programming 4 April 12th 07 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 03:46 AM.

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

About Us

"It's about Microsoft Excel"