PLEASE HELP! EXCEL QUESTION
Solved/Closed
drummo87
Posts
1
Registration date
Friday September 4, 2009
Status
Member
Last seen
September 5, 2009
-
Sep 5, 2009 at 10:15 AM
Blocked Profile - Sep 6, 2009 at 12:19 PM
Blocked Profile - Sep 6, 2009 at 12:19 PM
Related:
- PLEASE HELP! EXCEL QUESTION
- Excel marksheet - Guide
- Number to words in excel - Guide
- Excel apk for pc - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
- Excel date format dd.mm.yyyy - Guide
3 responses
Sub test()
Dim n, p As Integer
p = 0
For n = 1 To 7
If InStr(Cells(n, 1).Text, "Entry Draft") > 0 Then
p = p + 1
End If
Next
MsgBox (p & " Entries have been found")
End Sub
the function Instr return a long that correspond to the position of the string if it has been found, if it has been found the value is greater than 0
i suggest you learn a bit on this site
http://www.vb6.us/tutorials/vb6-string-functions
Dim n, p As Integer
p = 0
For n = 1 To 7
If InStr(Cells(n, 1).Text, "Entry Draft") > 0 Then
p = p + 1
End If
Next
MsgBox (p & " Entries have been found")
End Sub
the function Instr return a long that correspond to the position of the string if it has been found, if it has been found the value is greater than 0
i suggest you learn a bit on this site
http://www.vb6.us/tutorials/vb6-string-functions
aquarelle
Posts
7140
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
March 25, 2024
491
Sep 6, 2009 at 02:50 AM
Sep 6, 2009 at 02:50 AM
Hello,
It is not necessary to use VBA to do that, just use the following formula : =COUNTIF(A1:A7,"*Entry Draft*")
Best regards
It is not necessary to use VBA to do that, just use the following formula : =COUNTIF(A1:A7,"*Entry Draft*")
Best regards