Moving down cells

noobieexcel

New Member
Joined
Oct 23, 2006
Messages
28
Hi all,

May I know the maco code for moving automatically moving down a cell after you have input some data via userform? In this way, I can input data on my userform and the data all appear on different cells.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Welcome to the Board!

How's this for a start:

<font face=Tahoma><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> CommandButton1_Click()
    <SPAN style="color:#00007F">Dim</SPAN> LastRow <SPAN style="color:#00007F">As</SPAN> Range
        <SPAN style="color:#00007F">Set</SPAN> LastRow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp)
        LastRow.Offset(1) = TextBox1.Value
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

You'll get a less ambiguous answer if you give some more specifics, like the range, what User Form controls you have and what's the trigger to copy.

HTH,

Smitty
 
Upvote 0
Thanks,

Basically users need to input some text on a textbox (on the userform),
then exel will pick it and display on a cell. (A1)
Thereafter, if another user input some text on the textbox, the information will display on the next cell. (A2)

Please kindly advise
 
Upvote 0
Hi,

Smitty's code will do what you asked
did you try it ?

on your userform you need
a textbox TextBox1
a commandbutton CommandButton1

sheet Sheet1 will be affected
change all names (blue) to your suits

kind regards,
Erik
 
Upvote 0
Hi,

Smitty's code will do what you asked
did you try it ?

on your userform you need
a textbox TextBox1
a commandbutton CommandButton1

sheet Sheet1 will be affected
change all names (blue) to your suits

kind regards,
Erik

Hi, how about if I want the data to display on multiple columns, eg A1, B1, C1, then A2, B2, C2, and so on??

Please help! Thank you so much!
 
Upvote 0
how about if I want the data to display on multiple columns, eg A1, B1, C1, then A2, B2, C2, and so on??

Just change the Offset part accordingly:

Offset(Rows,Columns)

I.E. .Offset(1,1) will offset 1 row down, 1 column to the right.

Smitty
 
Upvote 0
how about if I want the data to display on multiple columns, eg A1, B1, C1, then A2, B2, C2, and so on??

Just change the Offset part accordingly:

Offset(Rows,Columns)

I.E. .Offset(1,1) will offset 1 row down, 1 column to the right.

Smitty

Thank you! It works really fine!
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,253
Members
448,556
Latest member
peterhess2002

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