ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   query information (https://www.excelbanter.com/excel-programming/366808-query-information.html)

tinytol

query information
 
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

NickHK

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





All times are GMT +1. The time now is 10:07 AM.

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