Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Contents Into Cell
Hi
How do you insert the contents of a variable into a cell? Thanks Michael |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Contents Into Cell
"Himszy" wrote in message . uk... Hi How do you insert the contents of a variable into a cell? Thanks Michael Also, how do you save the contents of a cell to a variable |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Contents Into Cell
Michael
Comment lines are preceded with ' Sub DemoVariable() 'Dimensions two variables Dim sName1 As String, sName2 As String 'Assigns one a string value sName1 = "Nick Hodge" 'Passes that string value to the 'range A1 on active sheet Range("A1").Value = sName1 'Picks up a value from A2 on active sheet 'and assigns to 2nd variable sName2 = Range("A2").Value 'Displays message box with 2nd variable value MsgBox sName2 End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "Himszy" wrote in message . uk... "Himszy" wrote in message . uk... Hi How do you insert the contents of a variable into a cell? Thanks Michael Also, how do you save the contents of a cell to a variable |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Contents Into Cell
"Nick Hodge" wrote in message ... Michael Comment lines are preceded with ' Sub DemoVariable() 'Dimensions two variables Dim sName1 As String, sName2 As String 'Assigns one a string value sName1 = "Nick Hodge" 'Passes that string value to the 'range A1 on active sheet Range("A1").Value = sName1 'Picks up a value from A2 on active sheet 'and assigns to 2nd variable sName2 = Range("A2").Value 'Displays message box with 2nd variable value MsgBox sName2 End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "Himszy" wrote in message . uk... "Himszy" wrote in message . uk... Hi How do you insert the contents of a variable into a cell? Thanks Michael Also, how do you save the contents of a cell to a variable Thanks Nick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert contents of variable cell address | Excel Discussion (Misc queries) | |||
Dump of all variable contents | Excel Programming | |||
Multiple If's, one variable. And filename as cell contents | Excel Programming | |||
Multiple If's, one variable. And filename as cell contents | Excel Programming | |||
Multiple If's, one variable. And filename as cell contents | Excel Programming |