View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Excel macro which prompts for input and moves to a cell - repeated

Hi,

You could do this

Do
response = Int(Val(InputBox("Enter Month of Year")))
If IsNumeric(response) And response = 1 And response <= 12 Then
Range("A1").Value = response
Else
response = ""
MsgBox ("You must enter a number between 1 & 12")
End If
Loop Until response < ""


This gets a numner between 1 & 12 and puts it in a1. repeat these steps
ammending the validation as necessary.

Mike



"KenZimbo" wrote:

To: All pundits in Microsoft Excel
From: Ken Spencer in Zimbabwe (Email: )
Subject: Kindly requests help on Microsoft Excel.
Date: 8 September 2008

In Lotus 123, (which I have long since stopped using) I used a simple Macro
to:
1. Go to a cell
2. Get a prompt to enter a value, e.g. €œEnter €˜Month of Year€
3. Enter the value and press Enter to move to another cell.
4. Get another prompt to enter another value, e.g. €œEnter €˜Sales Volume for
the Month€
5. Enter the value and press Enter to move to another cell
6. Etc Etc.

Can anybody out there please tell me how I can do this in Excel by recording
keystrokes in a Macro? Please note I havent the first clue about Microsoft
Visual Basic.

Thanks in advance

Kindest regards

Ken Spencer