Solved

excel scripting, count

Posted on 2013-11-20
6
315 Views
Last Modified: 2013-11-22
Hi, i have an excel question

in one excel file, two sheets
sheet1,
column1 as name
aaa
bbb
ccc
ddd
column2 as count

sheet2,
colume1 as member
aaa, "asdg"
aaa, "gadsds"
ccc, "dafdsgfdsag"
eee, "dagsd"
bbb, "dsaghdshjh"

I would like count how many records for sheet1 column1 if they are in the sheets.

thanks a lot!

s
0
Comment
Question by:BLarry9
  • 3
  • 2
6 Comments
 
LVL 21

Expert Comment

by:oleggold
Comment Utility
take countif(vlook
0
 

Author Comment

by:BLarry9
Comment Utility
looks like i need use vlookup in sheet1 B2
to compare sheet1 A2 with sheet2 columnA

but the text is not totally match,
in sheet1, is aaa
in sheet2, is aaa,"klhjashg"

please provide more information. thanks
0
 
LVL 21

Expert Comment

by:oleggold
Comment Utility
then use search to search for "aaa" in  aaa,"klhjashg"
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 21

Expert Comment

by:oleggold
Comment Utility
nest count or countif,vlookup or search to achieve the required reesult
0
 

Author Comment

by:BLarry9
Comment Utility
I am not an excel scripting person, please provide more information...

today is this first time i am doing this....
0
 
LVL 2

Accepted Solution

by:
samrad1 earned 500 total points
Comment Utility
Hey! I used a countif to the other sheet, and a search to extract the name on sheet 2, I've attached the file to this reply, take a look!


Formula for extracting the name in Sheet2 cell B2:
=LEFT(A2, SEARCH(",",A2) - 1)

Formula in Sheet1 cell B2 for counting the occurrences on Sheet2:
=COUNTIF(Sheet2!$B$2:$B$6,Sheet1!A2)

Example.xlsx
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
My experience with Windows 10 over a one year period and suggestions for smooth operation
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now