ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Promptbox value to go in the next empty cell (https://www.excelbanter.com/excel-programming/350616-promptbox-value-go-next-empty-cell.html)

harpscardiff[_16_]

Promptbox value to go in the next empty cell
 

Hi,

In my spreadsheet 2 hidden columns, IK and IL , which displays all
user IDs and in column IK and IL displays the name – So - BBob Billy
Bob.

What I want is a macro, which firstly, finds the next empty cell in
column IN, then prompt the user to enter the userid, then do the same
for IM.

Any help is much appreciated.

Cheers


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=501972


Bob Phillips[_6_]

Promptbox value to go in the next empty cell
 
Sub GetId()
Dim sID As String
Dim iRow As Long

If Range("IN1").Value = "" Then
Range("IN1").Select
Else
Range("IN" & Rows.Count).End(xlUp).Offset(1, 0).Select
End If
sID = InputBox("Input Id")
If sID < "" Then ActiveCell.Value = sID

If Range("IM1").Value = "" Then
Range("IM1").Select
Else
Range("IM" & Rows.Count).End(xlUp).Offset(1, 0).Select
End If
sID = InputBox("Input Id")
If sID < "" Then ActiveCell.Value = sID

End Sub


--

HTH

RP

"harpscardiff"
wrote in message
news:harpscardiff.21ryom_1137494400.8942@excelforu m-nospam.com...

Hi,

In my spreadsheet 2 hidden columns, IK and IL , which displays all
user IDs and in column IK and IL displays the name - So - BBob Billy
Bob.

What I want is a macro, which firstly, finds the next empty cell in
column IN, then prompt the user to enter the userid, then do the same
for IM.

Any help is much appreciated.

Cheers


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile:

http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=501972




harpscardiff[_17_]

Promptbox value to go in the next empty cell
 

Thats Brilliant !! Cheers.


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=501972



All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com