Input Data Into Last Row

John Davis

Well-known Member
Joined
Sep 11, 2007
Messages
3,457
Hello All:

I have the following spreadsheet situation:

A---------B----------C-----------D
INVOICE--DOCK-----DATE-------RAMP
20113----LEFT------06-20-------SGA
21190----LEFT------06-25-------MRS
23221---- ------

What I'd like to do using VB code is create an InputBox too fill in Columns B C and D. I need it too prompt for input on the very last row in the spreadsheet which has data in it. Can anyone help??
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
When is the prompt required -- ie what action is to invoke the prompt ?

The macro will be called from another macro. The prompt will be the inputbox itself (The title such as "Fill in the Dock" number. I need something like:

Range ("B" & lastrow with data) = InputBox("Fill in the Dock Number")

I don't know how too designate the lastrow.
 
Upvote 0
Hi
try the following codes

Code:
sub data_entry()
dim a as integer, x as integer
Dim b as string
x= cells(rows.count,1).end(xlUP).row
for a= 2 to 4
b= choose(a-1,"Dock", "Date", "Ramp")
cells(x,a) = Inputbox("enter " & b & " data")
Next a
End sub
Ravi
 
Upvote 0
Hi
try the following codes

Code:
sub data_entry()
dim a as integer, x as integer
Dim b as string
x= cells(rows.count,1).end(xlUP).row
for a= 2 to 4
b= choose(a-1,"Dock", "Date", "Ramp")
cells(x,a) = Inputbox("enter " & b & " data")
Next a
End sub
Ravi

Thanks for your input. I'll try this first thing in the morning. I got stuck in meetings all day.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,460
Members
448,965
Latest member
grijken

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