Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to paste variable value onto a Cell?
Through a code, I have got a variable some value. How do I paste it to a
Cell ? Like, For Each c In Worksheets("Sheet1").Range("A2:A5").Cells valie = c.Value If c.Value = 22381 Then wala = c.Offset(0, 5).Value If wala = "pills" Then milla = c.Offset(0, 2).Value counter = 0 ChDir "C:\milinda" Workbooks.Open FileName:="C:\milinda\sample-1.xls" Range("E" & counter + 1).Select ActiveSheet.Paste = milla I need to paste the value of milla in the said cell. What is the command ? Milind --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to paste variable value onto a Cell?
Milind,
You don't paste a variable, you just assign it, like so Range("E" & counter + 1).Value = milla -- HTH Bob Phillips "Milind" wrote in message ... Through a code, I have got a variable some value. How do I paste it to a Cell ? Like, For Each c In Worksheets("Sheet1").Range("A2:A5").Cells valie = c.Value If c.Value = 22381 Then wala = c.Offset(0, 5).Value If wala = "pills" Then milla = c.Offset(0, 2).Value counter = 0 ChDir "C:\milinda" Workbooks.Open FileName:="C:\milinda\sample-1.xls" Range("E" & counter + 1).Select ActiveSheet.Paste = milla I need to paste the value of milla in the said cell. What is the command ? Milind --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to copy&paste a variable range rows and colums | Excel Discussion (Misc queries) | |||
Adding the same cell in different worksheets. Can that cell be variable? | Excel Worksheet Functions | |||
Linking a cell to another workbook cell based on a variable name | Excel Discussion (Misc queries) | |||
Paste Link enters a 0 into the cell where I paste. How do I elemin | Excel Discussion (Misc queries) | |||
how do i use the function to copy and paste a determined variable. | Excel Worksheet Functions |