Link to home
Start Free TrialLog in
Avatar of Ted Penner
Ted PennerFlag for United States of America

asked on

Count terms in code

I need a way to process an entire spreadsheet where a code sample has been pasted and could be anywhere in the sheet.

Reading from left to right, and top to bottom, I need to produce a report in the next tab named "count" that contains each term used, and puts the number of times it was used to the right.  

Additionally, it should leave out any terms that follow a comment such as those the follow the marks // till the end of that row

or, are between the comment marks /*  */ on subsequent rows.

It just counts terms within any block of code.  That's it.  The code does not have to be a specific type.

The sheet I am working with is here https://docs.google.com/spreadsheets/d/14h2EmokFw6ovIWcn3hMzVCzL71gC76h9o7hQVgwWhBM/edit#gid=0

Assistance is greatly appreciated.
Avatar of Norie
Norie

What result(s) would you want/expect from the sample spreadsheet you posted a link to?
Avatar of Ted Penner

ASKER

Result tab included.  Sorry.  Thanks for the help.

apple 1
orange 7
banana 4
red 1
crab 2
Sorry, but my firewall won't let me open that link. Can you post the spreadsheet as a file? Is it an Excel spreadsheet or something else? I see the use of the "//" as a comment line and "/*" and "*/" for block comments, which is in line with Java syntax. Can Java be used to accomplish your task? If not, what methodology are you required to use?
And looking for something coded in gscript. If you pull up the script editor within the sheet, you will see a place to insert that code. It's intended to be coded for this shared spreadsheet.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial