query information
Not sure exactly what you are asking but..
Public Function TotalPower (argDevices As Range) As single
dim cell as range
dim temppower as single
for each cell in argdevices
if lcase(cell.value)="on" then
temppower =temppower +1 'Or however you calculate the power
end if
next
TotalPower=temppower
End function
NickHK
"tinytol" wrote in message
...
I'm not really sure how to ask this but I will try. I'm quering
information
from a website. I'm taking the information of devices being on and off and
trying to calculate that into daily expense of running that individual
peice
of equipment. So I guess I'm looking for a code that says something like
If
A1 = On then I put in my formula to calculate Kiliwatt hours. Sorr if this
is
confusing
|