Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Its clear that I am still a newbie... In VBA, how do I assign a value to a cell with out first selecting the cell? In pseudo code I would describe it as "Assign the value 5 to the cell in location x". Kind regards George |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try
cells(1,5)=5 or range("a5")=5 -- Don Guillett SalesAid Software "George Furnell" wrote in message ... Hi, Its clear that I am still a newbie... In VBA, how do I assign a value to a cell with out first selecting the cell? In pseudo code I would describe it as "Assign the value 5 to the cell in location x". Kind regards George |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the simplest form: Cells({row},{column}).value=5
More explicitly: Worksheets({worksheet id}).Cells({row},{column}).value=5 -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Hi, Its clear that I am still a newbie... In VBA, how do I assign a value to a cell with out first selecting the cell? In pseudo code I would describe it as "Assign the value 5 to the cell in location x". Kind regards George |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you, thats what I was looking for.
Kind regards George |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A1").Value = 1
It is also good practice to reference the workbook and worksheet With Activeworkbook With .Worksheets("Sheet1") .Range("A1").Value = 5 .... End With End With note the leading dots -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "George Furnell" wrote in message ... Hi, Its clear that I am still a newbie... In VBA, how do I assign a value to a cell with out first selecting the cell? In pseudo code I would describe it as "Assign the value 5 to the cell in location x". Kind regards George |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Color to a Cell based on another Cell on a diff Sheet | Excel Worksheet Functions | |||
Excel 2007 single cell selecting muliple cell | Excel Worksheet Functions | |||
Selecting a cell entry based on cell validation selection | Excel Worksheet Functions | |||
How can I assign a data for one cell from another fixed cell? | New Users to Excel | |||
How do i assign cell A1 to show the current cursor cell in Excel? | Excel Discussion (Misc queries) |