ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula in VBA!!! (https://www.excelbanter.com/excel-programming/326929-formula-vba.html)

PCOR

Formula in VBA!!!
 
Using VBA what syntax do I use to Take the figure in B7 and multiply it by a
figure in b8
Thanks


--
Norton Professional 2004 says this email is clean...believe it



Dave Peterson[_5_]

Formula in VBA!!!
 
without any validation at all:

with activesheet
msgbox .range("b7").value * .range("b8").value
end with



PCOR wrote:

Using VBA what syntax do I use to Take the figure in B7 and multiply it by a
figure in b8
Thanks

--
Norton Professional 2004 says this email is clean...believe it


--

Dave Peterson

Toppers

Formula in VBA!!!
 
Range("b7")*range("b8")

or

Cells(7,2)*cells(8,2)

If the result is to go into a cell (say A1), then
Range("a1")=Range("b7")*range("b8")

HTH

"PCOR" wrote:

Using VBA what syntax do I use to Take the figure in B7 and multiply it by a
figure in b8
Thanks


--
Norton Professional 2004 says this email is clean...believe it





All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com