Auto data fill in

S

Slashman

Hi,

I have a set of numbers in a column that are a standard set of numbers
that my other numbers are referred to. How can I auto pull in the set
of numbers without having to type them all in all the time when I use
different standards for my calculations to refer to?

Can I chose a set of numbers based on say selecting a radio button on
the sheet and then hitting a macro launching button to pull them in
perhaps?

Cheers in advance,

Aaron.
 
P

Paul B

Aaron, how about something like this,

Sub Number_Sets()
Dim Ans As String

Ans = InputBox("Type in number" & vbCr & _
"(1) = Set 1" & Chr(10) & _
"(2) = Set 2" & Chr(10) & _
"(3) = Set 3" & Chr(10) & _
"(4) = Set 4", "Number Sets")

If Ans = "" Then Exit Sub

Select Case UCase(Ans)

Case "1":
Range("A1") = "1"
Range("A2") = "2"
Range("A3") = "3"
Range("A4") = "4"
Range("A5") = "5"

Case "2":
Range("A1") = "6"
Range("A2") = "7"
Range("A3") = "8"
Range("A4") = "9"
Range("A5") = "10"

Case "3":
Range("A1") = "11"
Range("A2") = "12"
Range("A3") = "13"
Range("A4") = "14"
Range("A5") = "15"

Case "4":
Range("A1") = "16"
Range("A2") = "17"
Range("A3") = "18"
Range("A4") = "19"
Range("A5") = "20"

End Select
End Sub




--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
M

Max

Just some thoughts, not sure ..

Supposing your set of numbers are in a named col range, eg:
MyRange: =Sheet1!$A$1:$A$10

You could then create data validation droplists in any sheet via selecting
the desired range, then clicking Data > Validation, Allow: List, Source:
=MyRange. The DV droplists will show your set of numbers for easy selection.
 
S

Slashman

Hi,

Thanks for both of those suggestions, I will have a play and see which
solution works best for me.

Cheers,

Aaron.
 
Top