Input Prompt Box Macro

seankwest

New Member
Joined
Mar 12, 2012
Messages
8
Hello,

I would like to create an input prompt that would ask the user for a value and then it would take that value and input into a specific cell. For example:

What the the current month?
The user could type "3"
And then it would replace the value in Cell P3 with "3"

What is the current year?
The user could type "2012"
And then it would replace the value in Cell P4 with "2012"

What was last month?
The used could enter "'Feb 12"
And then it would replace the value in Cell P5 with "'Feb 12"

What was same month last year?
The used could enter "'Mar 11"
And then it would replace the value in Cell P5 with "'Mar 11"

Any ideas?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Try like this

Code:
Range("P3").Value = InputBox("What is the current month")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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