Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
Dim ws As Worksheet Set ws = Worksheets("Labor") With ws .Range("C4").Value = _ .Range("B4").Value * .Range("C6").Value End With "Ryan H" wrote: I need a very short way to refer to single cell ranges in a worksheet. I have a calculator that I use in VBA and it references cells in many worksheets. So I want to keep the code as clean as possible. For example, 'this is what I currently do Sheets("Labor").Range("B4").Value * Sheets("Labor").Range("C6").Value Is there a shorter way to write this? I think I have seen people use [B4] * [C6] or something like that, but how can I include the worksheet? Thanks in Advance! -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
reference to external ranges | Excel Programming | |||
variable reference ranges | Excel Discussion (Misc queries) | |||
Named ranges which seem to reference old workbooks/worksheets | Excel Discussion (Misc queries) | |||
Reference Ranges | Excel Programming | |||
How to Variable Reference Row Ranges? | Excel Programming |