Solved

# excel scripting, count

Posted on 2013-11-20
Medium Priority
373 Views
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"
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
Question by:BLarry9
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 2

LVL 21

Expert Comment

ID: 39663996
take countif(vlook
0

Author Comment

ID: 39664018
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"

0

LVL 21

Expert Comment

ID: 39664031
then use search to search for "aaa" in  aaa,"klhjashg"
0

LVL 21

Expert Comment

ID: 39664036
nest count or countif,vlookup or search to achieve the required reesult
0

Author Comment

ID: 39664048

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

LVL 2

Accepted Solution

ID: 39665208
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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.