Creating IF function in XL97

criswilk

New Member
Joined
Sep 5, 2006
Messages
9
Hi All,

What I would like to be able to do is create a basic IF function that will test cell A1 and look for '&' and then in cell B2 return the result of how many people are in the cell.

A1 has 2 people in that cell so it would return a value of 2 & then cell A2 would return a value of 1 & then I can use a sum formula to calculate the total of column B.

Example

A B
1 L&P Citizen 2
2 Z Peter 1
3 J&M Doe 2
5

I'm using Excel 97 & Windows XP Pro SP2.

Thanks in advanve for your help.

Regards
Chris Wilkinson
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

acw

MrExcel MVP
Joined
Feb 13, 2004
Messages
4,814
Chris

Try

Code:
=LEN(A1) - LEN(SUBSTITUTE(A1,"&",""))+1


Tony
 

Forum statistics

Threads
1,137,296
Messages
5,680,672
Members
419,924
Latest member
Dhamodharan992

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top