LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Pasting to Cells to the Right.

A sheet contains AC NO, DATE, and Amount of Clients.

116530 17-Feb-10 2000.00
39361 17-Feb-10 300.00
40236 18-Feb-10 350.00
10563 18-Feb-10 100.00
116530 19-Feb-10 250.00

Ac Nos are names of the excel workbook (116530.xls) located at D:\conference\

AC No Workbook looks like this. A Date, B Time, C Country, D Rate, E
Minutes, F Total, G is blank for remarks, H is date and I is Amount.


3-Mar-10 7:37 PM UK 1.00 58 58.00 2-Mar-10 200.00
3-Mar-10 8:46 PM UK 1.00 57 57.00
3-Mar-10 9:30 PM UK 1.00 25 25.00 4-Mar-10 500.00

1. I have to find first empty cell in column A ( A4 here )
2. Then i have to move cursor to H4 to paste data.
3. But if H4 is not empty i need to paste it to H5.

I tried this..

'Position the cursor in the first cell in the client file. Assumes
'client data will be posted beginning in column A. Adjust as required.
Range("A5").Select

' To Find the first empty cell where the current data can be posted.
Do While ActiveCell.Text ""
ActiveCell.Offset(1, 0).Select
'Assumes Excel sheets have 65536 rows. This prevents running
'off the bottom of the worksheet and causing an error. Adjust as
'required.
If ActiveCell.Row 65536 Then Exit Sub
Loop

'Paste the client data into the client worksheet file.
ActiveSheet.Paste

What do i need to change here so that i can paste data to empty cell in
column H (Data in H is not contiguous )





 
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
PASTING NON ADJACENT CELLS FarGardener Excel Discussion (Misc queries) 3 November 27th 07 06:31 AM
Image pasting to incorrect cells or bad location within cells [email protected] Excel Programming 5 October 10th 07 04:38 PM
Pasting Visible Cells LyndieBee Excel Discussion (Misc queries) 1 February 17th 06 06:19 PM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
Pasting single cells from Word to multiple cells in Excel ASBiss Excel Worksheet Functions 1 February 15th 05 11:47 AM


All times are GMT +1. The time now is 05:39 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"