raven_squire
Board Regular
- Joined
- Jan 13, 2013
- Messages
- 99
Hello,
I have the code below that works as intended (except the last condition matches with Bananas for simplicity). I need to change it so that in adition to existing criteria it counts all alarms starting with "Ban". So it would count all the alarms for "Bananas", "Bandanas", "Bankrupt" etc etc etc I dont know how many different kinds of alarms start with "Ban". I dont know how to alter the cells in the range before comparing them. Any help would be apreciated.
Worksheets("Statistics").Cells(28, 2).Value = Application.WorksheetFunction.CountIfs(Worksheets("AlarmListing").Range("Table1[Date]"), ">=" & _
startDate, Worksheets("AlarmListing").Range("Table1[Date]"), "<=" & endDate _
, Worksheets("AlarmListing").Range("Table1[[Alarm Type]]"), "Bananas")
Thankyou
I have the code below that works as intended (except the last condition matches with Bananas for simplicity). I need to change it so that in adition to existing criteria it counts all alarms starting with "Ban". So it would count all the alarms for "Bananas", "Bandanas", "Bankrupt" etc etc etc I dont know how many different kinds of alarms start with "Ban". I dont know how to alter the cells in the range before comparing them. Any help would be apreciated.
Worksheets("Statistics").Cells(28, 2).Value = Application.WorksheetFunction.CountIfs(Worksheets("AlarmListing").Range("Table1[Date]"), ">=" & _
startDate, Worksheets("AlarmListing").Range("Table1[Date]"), "<=" & endDate _
, Worksheets("AlarmListing").Range("Table1[[Alarm Type]]"), "Bananas")
Thankyou