I am trying to count the number of RTD calls in a given worksheet. The formula that I used was =COUNTIF(A1:FF1000, "*server*"). Server is a particular word in the RTD call that is exclusive to any RTD call in my spreadsheet. The problem is that the countif function does not see formulas, it only sees that the cell is blank (if macros not enabled) or that the cell has the value off the server (if macros are enabled). How can I get excel to consider formulas programmed into each cell, not the actual displayed value?
if I can't do it that way, is there a way I can literally tell excel, count this cell if it is an RTD call?
Thank you so much for any help!
Welcome to the forum!
I don't know what RTD means.
Sub Test_CountFormulasLikeWord() MsgBox CountFormulasLikeWord(Range("A1:FF1"), "server") End Sub Function CountFormulasLikeWord(fRange, theWord As String) As Long Dim cr As Long, cell As Range For Each cell In fRange If InStr(1, cell.Formula, theWord, vbTextCompare) Then _ cr = cr + 1 Next cell CountFormulasLikeWord = cr End Function
Kenneth - Thank you so much!
RTD is real time data. RTD calls pulls data off a server into the spreadsheet.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks