Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by AndreasHermle
at 2024-07-28 23:56:25
Point:500 Replies:3 POST_ID:829150USER_ID:12043
Topic:
Microsoft Excel Spreadsheet Software;;
Dear Experts:
I got thousands of entries in Column A. Part of the string in these entries can be 99-999-99-99 such as ...
P:\Graphics\MyFolder\99\99-999-99-99.tif
I would like a macro ...
... to count the number of entries in Column A in the current worksheet where the sub-string 99-999-99-99 occurs.
The result is to be displayed in D5 of the current worksheet.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
I got thousands of entries in Column A. Part of the string in these entries can be 99-999-99-99 such as ...
P:\Graphics\MyFolder\99\99-999-99-99.tif
I would like a macro ...
... to count the number of entries in Column A in the current worksheet where the sub-string 99-999-99-99 occurs.
The result is to be displayed in D5 of the current worksheet.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Author: AndreasHermle replied at 2024-07-29 04:06:20
Dear both,
both codes / formulas work just fine. I suggest splitting the points 350:150
Thank you very much for your great and swift support. I really appreciate it. Regards, Andreas
both codes / formulas work just fine. I suggest splitting the points 350:150
Thank you very much for your great and swift support. I really appreciate it. Regards, Andreas
Accepted Solution
Expert: duncanb7 replied at 2024-07-29 00:30:32
350 points EXCELLENT
it should be
=CountIf(A:A, "*" & "99-999-99-99" & "*")
you can try this macro
Duncan
=CountIf(A:A, "*" & "99-999-99-99" & "*")
you can try this macro
Duncan
Sub test()ActiveSheet.ActivateDim str As Stringstr = "99-999-99-99"ActiveSheet.Range("D5") = Application.WorksheetFunction.CountIf(ActiveSheet.Range("A:A"), "*" & str & "*")ActiveSheet.Range("D5").SelectEnd Sub 1:2:3:4:5:6:7:
Assisted Solution
Expert: krishnakrkc replied at 2024-07-29 00:11:27
150 points EXCELLENT
Hi
Do you really need a macro for this ?
=COUNTIF(A:A,"*99-999-99-99*")
would suffice.
Kris
Do you really need a macro for this ?
=COUNTIF(A:A,"*99-999-99-99*")
would suffice.
Kris