IF.. Then.. Post to specific cell

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Hi there,
Here is my logic however I need help on the syntax
Need an input box to ask the user "what day of the month
do you want the data posted to?"
Once the user replies....ex: 21 for the 21st of the month
I want data copied from a1:a3 posted to Rox x of the
column that I'll have previously named Day21....ex: Col
AA,Row5 will be named "Day21".
This is all on the same worksheet.

If input is 1 then
post to cell named Day1
elseif input is 2 then
post to cell named Day2
etc.

Thans for your support,
Joe
 
The following will take the values in A1:A3 and copy them to a Named Range
using numerical value entered into the input box.

Public Sub post()
Dim x As Integer
x = InputBox("Enter Date")
If x > 0 Then
Range("A1:A3").Copy Destination:=Range("Day" & x)
End If
End Sub

Cheers
Nigel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top