I'm lost here. I need to count the number or rows that contain different text. In one column, it will be an exact match to the cell. In the other column, the text will be contained within the cell. I'm guessing that I want to create a function that will accept the name of the worksheet and the two search strings and return the count. Any help would be appreciated.
VBA Excel Find in 2 Column with Count
Collapse
X
-
Tags: None
-
Is it possible to give an example with the original data and what you want to find?I'm lost here. I need to count the number or rows that contain different text. In one column, it will be an exact match to the cell. In the other column, the text will be contained within the cell. I'm guessing that I want to create a function that will accept the name of the worksheet and the two search strings and return the count. Any help would be appreciated.
Or better: attach a sheet to your mail with the start data and the expected results. -
VBA Excel Finds with Count
I'm attaching a sample worksheet. The code I need will find an exact match in column "E", for example "SR032526" and search the text in column "D" for a specified string - perhaps "SERVICES". With these examples, I would need a function that returned 2, which is the number of rows (row 3 and row 5) that meet those criteria. Thanks.Attached FilesComment
-
-
Last edited by Niheel; May 27 '10, 08:31 PM. Reason: removed dear and br, makes it harder to read the discussionsComment
-
VBA Excel Find with Count
OK. Let's try this again. I'm attaching a zipped file.Attached FilesComment
-
Attached is a zipped XLS with the macro "Find_Rows" .
Run it and it will give you a msgbox with "2".
I hope this will help you.Attached FilesLast edited by Niheel; May 27 '10, 08:31 PM. Reason: removed dear and br, makes it harder to read the discussionsComment
-
VBA Excel Find with Count
Thanks! This is just what I need. I'll tweak it a bit to make it a reusable function and I should be good to go. Thanks for your help.Comment
Comment