• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

excel scripting, count

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
BLarry9
Asked:
BLarry9
  • 3
  • 2
1 Solution
 
oleggoldCommented:
take countif(vlook
0
 
BLarry9Author Commented:
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
 
oleggoldCommented:
then use search to search for "aaa" in  aaa,"klhjashg"
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
oleggoldCommented:
nest count or countif,vlookup or search to achieve the required reesult
0
 
BLarry9Author Commented:
I am not an excel scripting person, please provide more information...

today is this first time i am doing this....
0
 
samrad1Commented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now