Change it to a variable

  • Thread starter Thread starter alvin Kuiper
  • Start date Start date
A

alvin Kuiper

HI
i have this code:
Range("perioder!$H$" & start).Value
where start is a variable
now i also want to change $h$ to a variable
but i Can't make it right
Help
Alvin
 
Try using the cells command instead, it is much easier to call both a row and
column. The column does have to be a number reference.

Sheets("perioder").Cells (start,column number).value
 
Try this

Dim MyCell As String
Dim Start As Long
MyCell = "H"
Start = 1
x = Range("perioder!" & MyCell & Start).Value

Mike
 
Hi Alvin

One way, with colno as the variable holding the column number required (8),
then
sheets("perioder").cells(start , colno).Value
 
Sheets("perioder").Cells(start,8).value

OR

strCol = "H"
Range("perioder!" & strCol & start).Value

OR

strCol = "H"

Sheets("perioder").cells(start,strCol).Value
 
Thanks to all

And Jacob I give a beer if you ever come to denmark
Just write
Alvin


"Jacob Skaria" skrev:
 
Back
Top