
lea cohen
Member
Members

Forum Posts: 237
Member Since:
March 10, 2016
March 10, 2016

Hi, in the attached file which is just an example - in column A there are answers I received to the questionnaire.
In the report on the side I need him to look for the word Cousult
in a column and count how many times it is written.
I will note that the word counsel is written within a sentence.
How do you do it??
In my work file there are 20 comments and I can't search them manually one by one..
Thank you very much...

Alan Sidman
Steamboat Springs, CO
Member
Members

Trusted Members

Trusted Members

Forum Posts: 174
Member Since:
October 18, 2018
October 18, 2018

Here is a Macro solution for Consult which you can adapt for your other counts
Option ExplicitSub Lea()Dim i As Long, lr As Long, x As Longlr = Range("A" & Rows.Count).End(xlUp).Rowx = 0For i = 2 To lrIf InStr(Range("A" & i), "consult") > 0 Thenx = x + 1End IfNext iRange("C3") = xEnd Sub

lea cohen
Member
Members

Forum Posts: 237
Member Since:
March 10, 2016
March 10, 2016

Thanks!!!
I need the answer to many cells in the report on the side.
So I would love to understand how to activate the macro and how to get the answer in all the cells. Thanks!!!!
And it is not possible to write this in a normal function in Excel? Why do you need a macro code?
If you could send me the answer in the file, it would help me a lot, thanks!!!
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Charlotte Holloway, Lorna Henning, Tracy English, Shoua Lee, Mohamed Touahria
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
David von Kleek
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Christy Nichols
Harald Endres
Ashley Hughes
Herbie Key
Trevor Pindling
Forum Stats:
Groups: 3
Forums: 24
Topics: 6528
Posts: 28594
Member Stats:
Guest Posters: 49
Members: 32817
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —
