1 row to the other

zaahir

Board Regular
Joined
Oct 11, 2006
Messages
55
Hi
i add data to a spreadsheet using a userform. after having inserted the data i need the next row to be selected and then the new data added into that row.
Please advise me on how to do this!!!

Regards
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You first need to determine which column you are going to use to determine where the next row should go (you should pick a column that will always have data).

If it was column A, here is code that will select the first available row in column A (after the last row of data in column A with data):

Range("A65536").End(xlUp).Offset(1,0).Select
 
Upvote 0
Hi
oh, i have done that bt did nt specify the A & the number. Thanx,
will this code allow for multiple column entries i.e
row 5 data into col d, e, f etc?

Regards
 
Upvote 0
Once you have selected column A using that code, you can then post things in the other columns in the same row using the offset command, i.e.
if you are in column A and want to post something in column D of that row, you can use:
ActiveCell.Offset(0,3)
or
Cells(ActiveCell.Row, "D")
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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