I am writing a script on VB (Excel), tell me how to write data to a cell with a column name and row number. Thank.
- What is meant by the name: column name (A, B, AF)? title in the table header? the name assigned to the range? Show me an example. And the label does not seem to be the same. VB and VBA are not the same thing - vikttur
|
1 answer
https://stackoverflow.com/questions/10106465/excel-column-number-from-column-name
Write to cell "B10" value "27"
Range("B" & 10).Value = 27
Or so
ColName = "B" RowNumber = "10" Range(ColName & RowNumber).Value = 27
You can still through Cells
ColName = "B" RowNumber = "10" Cells(RowNumber, Range(ColName & 1).Column).Value = 27
- I have not formulated the question. I mean that there is a column with names, for example Names and line number - Germes1989
- @ Germes1989 did not become clearer. add a description to the question with an example of the table and the result - slippyk
|