Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Const or Variable that doesn't change | Excel Programming | |||
Change a Variable Name in a For...Loop | Excel Programming | |||
Change variable value of -1 to 1 | Excel Programming | |||
change firstrow variable to be the 2nd row value instead of the fi | Excel Programming | |||
Change variable permanently | Excel Programming |