ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   i want to input data into a range from a simple input location (https://www.excelbanter.com/excel-programming/440280-i-want-input-data-into-range-simple-input-location.html)

joemassillon

i want to input data into a range from a simple input location
 
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

Hubisan

i want to input data into a range from a simple input location
 
Add the following macro to a button:

Sub MatrixFill()

With ActiveSheet
ActiveWorkbook.Sheets("table2").Range("A1:AV48").C ells(.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


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com