Auto add text into the first unoccupied cell

Summerso1

New Member
Joined
Jul 24, 2014
Messages
45
Hi in VBA I am looking for a script to look down a column and place a word after the last occupied cell e.g below so the word would go in A7

A
1 Help
2 Me
3 Please
4 I
5 Hate
6 VBA
7
8
9

James
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Well, if we assume the word is hello, it will always enter hello. Also, if not a button push, you're going to want to activate it somehow. Otherwise, you will get:

A
1 Help
2 Me
3 Please
4 I
5 Hate
6 <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym>
7 hello
8 hello
9 hello
10
hello
11
hello
12
hello
13
hello
14
hello
15
hello
16
hello
...
999999999999
hello
 
Upvote 0
Try it this way within whatever VB code you have...

Columns("A").SpecialCells(xlBlanks)(1).Value = "Hello"
 
Upvote 0
Try,

Code:
Sub Insert_Word_End()
Range("[COLOR=#0000cd]A[/COLOR]" & Rows.Count).End(xlUp).Offset(1, 0).Value = InputBox("Enter the word", "Need Input", "Example Data")
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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