Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Group, On a worksheet I can subtract in cell =B2 - B1 in cell B3. How would I do the same operation in VBA? Tony -- ajocius ------------------------------------------------------------------------ ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695 View this thread: http://www.excelforum.com/showthread...hreadid=488576 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tony
Somevalue=Range("B2").Value-Range("B1").Value This presumes the sheet is active (Else you'll need to define the worksheet before the Range object), you can then read Somevalue variable There are other ways to do this like writing a user defined function, but not knowing what you are trying to do with the value the above should give you a start -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "ajocius" wrote in message ... Group, On a worksheet I can subtract in cell =B2 - B1 in cell B3. How would I do the same operation in VBA? Tony -- ajocius ------------------------------------------------------------------------ ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695 View this thread: http://www.excelforum.com/showthread...hreadid=488576 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you for the help. This is what I needed to subtract two times to get the time-interval. Works like a champ. Thanx again. Tony -- ajocius ------------------------------------------------------------------------ ajocius's Profile: http://www.excelforum.com/member.php...o&userid=17695 View this thread: http://www.excelforum.com/showthread...hreadid=488576 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
subtraction | Excel Discussion (Misc queries) | |||
subtraction | Excel Discussion (Misc queries) | |||
Subtraction | Excel Worksheet Functions | |||
subtraction with dates | Excel Worksheet Functions | |||
subtraction | Excel Programming |