i want to input data into a range from a simple input location

J

joemassillon

I am building a matrix 48X48 and rather than going to that tab and locating
the location i want to have a tab as an input page to type in one of the "Y"
and an "X" and type in the number i want at that location. Front end of a
Data base type input -
Y location _____
X location _____

Data to input _____

Enter data Tab
 
H

Hubisan

Add the following macro to a button:

Sub MatrixFill()

With ActiveSheet
ActiveWorkbook.Sheets("table2").Range("A1:AV48").Cells(.Range("A1"), .Range("A2"))
= .Range("A3")
End With

End Sub

' table2 stands for the name of the sheet with the matrix
' A1:AV48 is the range on that sheet
' A1 is the Y location
' A2 is the X location
' A3 is the value

adapt the ranges and name of the sheet.

Hubisan
 

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

Top