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?
 
Michael thank you for correcting me on manners - your are right I forgot to say thank you I won't forget that any more. When I used Neils it did not work I did use Sub & End Sub at beginning and at end of the codes - I actually copied it to my module
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I've not read through the entire thread, but you've posted this twice:

Code:
...cells(rows.count,"A").End([COLOR=#ff0000]1xUp[/COLOR])...

The constant is xlUp

If you put Option Explicit at the top of every code module, you'll never have that problem again.
 
Upvote 0
Hi Texas: Mr.MVP I do have Option Explicit at the top of every code module I read this correct way ...cells(rows.count,"A").End(1xUp) can this read like this? ...cells(rows.count,"A4).End1xUp) and it will go to A4 on the second sheet This is how I wrote the code: Sub TestAddress() Sheets(1) [c6].copy Sheets(2).cells(row.count, "A4").End(1xUp).(1,0) End Sub Thank you for writing back any suggestions what I am doing wrong?
 
Upvote 0
I've not read through the entire thread, but you've posted this twice:

Code:
...cells(rows.count,"A").End([COLOR=#ff0000]1xUp[/COLOR])...

The constant is xlUp

If you put Option Explicit at the top of every code module, you'll never have that problem again.

Thank you. I did put Option Explicit at the top of every code module but where (rows.count,"A") can I but (rows.count,"A4") so it will start there and go down to next cell. ? Dianne
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,399
Latest member
alchavar

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