Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andyd74
 
Posts: n/a
Default matching part of an entry in a cell


I'm trying to return how many entries in a list that contain the first
part of that entry and they meet another criteria

i.e.

A list like

Andy smith 2
Andy jones 3
Andy Simons 2

And i want to count how many Andy's there are regardless of the
surname, where these entries equal "2".

Any ideas?

Thanks

Andy


--
Andyd74
------------------------------------------------------------------------
Andyd74's Profile: http://www.excelforum.com/member.php...o&userid=34013
View this thread: http://www.excelforum.com/showthread...hreadid=545169

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default matching part of an entry in a cell

Try this, assuming your names are in column A and numbers in column B
and that these occupy rows 1 to 50:

=SUM(IF(((LEFT(A1:A50,4)="Andy")*(B1:B50=2)),1,0))

This is an array formula, so once you have typed it in (or subsequently
edit it) you must use CTRL-SHIFT-ENTER instead of just ENTER. If you do
this correctly, then Excel will wrap curly braces { } around the
formula - you must not type these yourself.

You could put the word Andy in another cell, eg C1, and then refer to
the cell in the formula.

Hope this helps.

Pete

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Return entry in column above/below cell TheRobsterUK Excel Worksheet Functions 2 November 17th 05 03:34 PM
I need help with an "If" Statement Whayne Excel Worksheet Functions 3 July 20th 05 09:25 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
enter a time into a cell, have the cell show two times the entry johnp Excel Worksheet Functions 3 May 2nd 05 12:08 AM


All times are GMT +1. The time now is 04:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"