Excel 2010 vba code - i am in need to solve:

farsea

New Member
Joined
Jun 27, 2012
Messages
9
VBA code to copy sheet1 Range (C6) to Sheet2 (Range A4) + find next blank space in in column A to add more info from shee1 Range(C6) to same column on sheet 2 I hope I explained ok. I have address on sheet1 always in C6 and this address changes but I want to copy the new address to sheet2 to show new address on the next row down. Can it be done?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Code:
Sheets("Sheet1").Range("C6").Copy Sheets("Sheet2").Range("A4").End(xlDown).Offset(1)
 
Upvote 0
It might help if you could say if you get a debug error or the code runs but you don't get the intended result.
I think it is missing the Sub and End Sub at least for some purposes.
 
Upvote 0
Sub Test address()
Sheets(1).[c6].copy sheets(2).cells(rows.count,"A").End(1xUp).Offset(1,0)
End Sub

This will work, but it will not start on sheet(2)at (A4) - it starts at A2 then goes to next cell below - Dianne
Sorry I was out all day until today June 28 - to reply -any help would be appreciated other wise I may have to change my format - hope you can help
 
Upvote 0
So why didn't you use Neils code, as supplied.
The code you have provided back to us will start at the last populated row in column "A", which may well be A2
 
Upvote 0
June 29 - It runs but didn't get result as intended. I appologize I am new to this forum and learning how to use. On sheet (1) Row Column C6 (I insert address) - On sheet (2) Row Column (A4) I want the address copy to. The format I have row A1 thru A3 have Text line A4 is blank There is my start point. The formula I found originally is this: (Original) Sub Test Address() Sheets(1).[c6].copy sheets(2).cells(rows.count,"A").End(1xUp).Offset(1,0) This works, but always starts at A2 that is my problem I would like it to start at A4
End Sub Also originally I had sheets(1)Named Inspect and sheets(2)DailyWrks -Is it possible to change sheets to the Name of a sheet or do I always have to keep it as sheet(1) & sheet(2)????? I did leave it as sheet(1) etc. New At VBA too - THANK YOU SO MUCH I APPRECIATE YOUR HELP
 
Upvote 0

Forum statistics

Threads
1,219,162
Messages
6,146,661
Members
450,706
Latest member
LGVBPP

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