![]() |
Change it to a variable
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 |
Change it to a variable
Where c col is a number 1..256.
Sheets("perioder").cells(start,Col).Value "alvin Kuiper" wrote: 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 |
Change it to a variable
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 -- If this helps, please remember to click yes. "alvin Kuiper" wrote: 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 |
Change it to a variable
Try this
Dim MyCell As String Dim Start As Long MyCell = "H" Start = 1 x = Range("perioder!" & MyCell & Start).Value Mike "alvin Kuiper" wrote: 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 |
Change it to a variable
Hi Alvin
One way, with colno as the variable holding the column number required (8), then sheets("perioder").cells(start , colno).Value -- Regards Roger Govier "alvin Kuiper" wrote in message ... 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 |
Change it to a variable
Sheets("perioder").Cells(start,8).value
OR strCol = "H" Range("perioder!" & strCol & start).Value OR strCol = "H" Sheets("perioder").cells(start,strCol).Value -- If this post helps click Yes --------------- Jacob Skaria "alvin Kuiper" wrote: 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 |
Change it to a variable
Thanks to all
And Jacob I give a beer if you ever come to denmark Just write Alvin "Jacob Skaria" skrev: Sheets("perioder").Cells(start,8).value OR strCol = "H" Range("perioder!" & strCol & start).Value OR strCol = "H" Sheets("perioder").cells(start,strCol).Value -- If this post helps click Yes --------------- Jacob Skaria "alvin Kuiper" wrote: 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 |
Change it to a variable
Thanks Alvin for the feedback and offer..
If this post helps click Yes --------------- Jacob Skaria "alvin Kuiper" wrote: Thanks to all And Jacob I give a beer if you ever come to denmark Just write Alvin "Jacob Skaria" skrev: Sheets("perioder").Cells(start,8).value OR strCol = "H" Range("perioder!" & strCol & start).Value OR strCol = "H" Sheets("perioder").cells(start,strCol).Value -- If this post helps click Yes --------------- Jacob Skaria "alvin Kuiper" wrote: 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 |
All times are GMT +1. The time now is 02:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com