How to: calculate number of pieces when seperated by a '/' symbol

Hi all,

I would like to calculate the number of pieces if it was seperated by a '/' 
symbol.

i.e. 999999/88 equals two pieces
i.e. 999999 equals one piece
i.e. 999999/88/77 equals three pieces

Thank you in advanced. 


0
mas13 (2)
5/12/2005 10:28:41 AM
excel 39879 articles. 2 followers. Follow

6 Replies
610 Views

Similar Articles

[PageSpeed] 46

Hi
Here's one way:
=LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))+1

-- 
Andy.


"Mas" <mas13@hotmail.com> wrote in message 
news:u1TWo1tVFHA.2424@TK2MSFTNGP10.phx.gbl...
> Hi all,
>
> I would like to calculate the number of pieces if it was seperated by a 
> '/' symbol.
>
> i.e. 999999/88 equals two pieces
> i.e. 999999 equals one piece
> i.e. 999999/88/77 equals three pieces
>
> Thank you in advanced.
> 


0
Andy
5/12/2005 10:33:58 AM
One way:

If the string is in cell A1:

    =LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) + (LEN(A1)>0)



In article <u1TWo1tVFHA.2424@TK2MSFTNGP10.phx.gbl>,
 "Mas" <mas13@hotmail.com> wrote:

> Hi all,
> 
> I would like to calculate the number of pieces if it was seperated by a '/' 
> symbol.
> 
> i.e. 999999/88 equals two pieces
> i.e. 999999 equals one piece
> i.e. 999999/88/77 equals three pieces
> 
> Thank you in advanced.
0
jemcgimpsey (6723)
5/12/2005 11:23:58 AM
Note that this will return 1 if the cell is blank.

That may be acceptable to the OP if the cell will always be populated.


In article <OKrya4tVFHA.2420@TK2MSFTNGP12.phx.gbl>, <Andy B> wrote:

> Hi
> Here's one way:
> =LEN(A2)-LEN(SUBSTITUTE(A2,"/",""))+1
0
jemcgimpsey (6723)
5/12/2005 11:25:08 AM
JE McGimpsey wrote...
>One way:
>
>If the string is in cell A1:
>
>=LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) + (LEN(A1)>0)
....

Getting really picky, if "/9/8/7/" would be 5 fields, with the first
and last blank, should the result of the formula ="" be 0 or 1 fields?
If 1, then

=LEN(A1)-(LEN(SUBSTITUTE(A1,"/","")))+1-ISBLANK(A1))

0
hrlngrv (1990)
5/12/2005 4:34:35 PM
Thanx.

I would like to expand on it a little more and not only for the formula to 
refer to A1 but the who column of "A" ... i.e a continues range of numbers.

Mas


"JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message 
news:jemcgimpsey-A378D6.05235812052005@msnews.microsoft.com...
> One way:
>
> If the string is in cell A1:
>
>    =LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) + (LEN(A1)>0)
>
>
>
> In article <u1TWo1tVFHA.2424@TK2MSFTNGP10.phx.gbl>,
> "Mas" <mas13@hotmail.com> wrote:
>
>> Hi all,
>>
>> I would like to calculate the number of pieces if it was seperated by a 
>> '/'
>> symbol.
>>
>> i.e. 999999/88 equals two pieces
>> i.e. 999999 equals one piece
>> i.e. 999999/88/77 equals three pieces
>>
>> Thank you in advanced. 


0
mas13 (2)
5/14/2005 4:14:27 AM
Try...

=SUMPRODUCT(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,"/",""))+(LEN(A1:A10)>0))

Hope this helps!

In article <#FM01tDWFHA.2684@TK2MSFTNGP09.phx.gbl>,
 "Mas" <mas13@hotmail.com> wrote:

> Thanx.
> 
> I would like to expand on it a little more and not only for the formula to 
> refer to A1 but the who column of "A" ... i.e a continues range of numbers.
> 
> Mas
> 
> 
> "JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message 
> news:jemcgimpsey-A378D6.05235812052005@msnews.microsoft.com...
> > One way:
> >
> > If the string is in cell A1:
> >
> >    =LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) + (LEN(A1)>0)
> >
> >
> >
> > In article <u1TWo1tVFHA.2424@TK2MSFTNGP10.phx.gbl>,
> > "Mas" <mas13@hotmail.com> wrote:
> >
> >> Hi all,
> >>
> >> I would like to calculate the number of pieces if it was seperated by a 
> >> '/'
> >> symbol.
> >>
> >> i.e. 999999/88 equals two pieces
> >> i.e. 999999 equals one piece
> >> i.e. 999999/88/77 equals three pieces
> >>
> >> Thank you in advanced.
0
domenic22 (716)
5/14/2005 11:01:26 AM
Reply:

Similar Artilces:

Calculating Taxes and Making calculations
Hello, Kindly plz tell me how do i go about making some small calculations based on my existing data such as how to compute taxes and do other calculations based on some quantitative data. where exactly do i make modifications on my application??? Kindly help me out. Thanks , swati you can add code in javascript behind dropdowns or piclist fields. One example might be a dropdown which has shipping options ie ups, fedex etc. When you choose one it takes the weight of your package (whcih you enter) then calculates a shipping cost. search the archives of this group at groups.google.com and ...

Seperate Users
Both my wife and I have seperate banking accounts with the same bank. She has used Money 2002 for a few years and i just started a month ago. When we added my account we got many errors, can 2 users run 2 seperate accounts with the same bank? We are running Windows Xp OS. Did you add your account to the same Money file? Do you download transaction data? Do you want to see joint data like cash flow and net worth? I assuming the answers are yes, yes, and yes. You don't describe "many errors." Perhaps you should read http://umpmfaq.info/faqdb.php?q=150 and http://umpmfaq.info/f...

Procedure to calculate distance using latitude/longitude
Does anyone know of a vba procedure for access that will calculate straightline distance using latitude and logitude for 2 points? AJ wrote: > Does anyone know of a vba procedure for access that will calculate > straightline distance using latitude and logitude for 2 points? See: http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b James A. Fortune MPAPoster@FortuneJames.com ...

How to calculate age of a person?
Hi, I'm struggling to figure this one out. I have a date column and I'd like to be able to calculate the age without doing it in my head. I've tried to do this but am struggling. Any help will greatly appreciated. Thanks Suzanne Visit www.cpearson.com and search for DATEDIFF best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Grd" <Grd@discussions.microsoft.com> wrote in message news:6BFFD11C-AECB-4837-93B6-D84B6170B975@microsoft.com... > Hi, > > I'm struggling to figure this one out. I have...

Euro symbol in queries
I have an Access front end to a SQL Server 2005 database using ODBC linked tables. There appears to be a problem when using the euro symbol in queries. SELECT * FROM tbl_Datatable WHERE (tbl_Datatable.strPRICE)='?40'; (the ? should be a euro symbol Alt+0128. it appears that even just posting causes the same problem) This query returns nothing although there are many entries with a strPRICE of '?40' SELECT * FROM tbl_Datatable WHERE (tbl_Datatable.strPRICE)='$40'; This query returns all with a strPRICE of '$40' How do I use the symbol in queries? Rega...

EXCEL 2007 Formula to calculate INTEREST only on a 3 month bridge
I am trying to calculate monthly INTEREST ONLY payment on a short term bridge/swing loan. Assuming an interest rate of 2.75%, paid monthly, Also assuming it will be required for a 3-6 month period, amount approx $500,000. Just switched to Excel 2007 but don't seem to be able to calculate using the formula builder. Not sure if it is compounded daily or monthly. You might want to check out the IPMT function. From the XL help file: IPMT(rate,per,nper,pv,fv,type) Rate is the interest rate per period. Per is the period for which you want to find the interest and must...

Due Date Calculated
I need assistance on an expression that allows for the due date of recurring training to be one year from date completed. Details are as follows: I have a form named [frmTRNComplete] based on table named [tblTRNComplete] Form controls are: TRNID (combo box), DateComp (Text Box) , DateNext (text box), Reccuring (check box) I would like the DateNext to be 1 year from DateComp if Reccuring is true and Date next to be blank if Reccuring is false. -- Aloha, Ron A. Ron I'll assume that you want to use the form to calculate the DateNext, and that you are not trying to s...

how to calculate outliers
Google is your friend: http://www.google.com/search?q=calculate+outliers - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "ismhs" <ismhs@discussions.microsoft.com> wrote in message news:035124A0-06FA-4153-932E-6C4E0614F38C@microsoft.com... > ...

Number not showing correctly
Hi, I had tried to enter a 12digit number in a worksheet but after entering it its not showing the coorrect number.Eg Iam trying to enter 857268578633 in the work sheet but after entering its showing 8.57269e+11 Why its happened Like this can you please explain me the format of the cell is probably 'General' instead of number. When you select number you can select the number of decimal places and/or the comma and negative number format if you like. If it then shows up as ###### or still has the scientific format appearance, you can widen the column. "Nawas" wrote: ...

New! Consecutive Numbering Tutorial for Publisher 2002/2003
http://www.mvps.org/publisher/numbering1.html Brian Kvalheim Microsoft Publisher MVP http://www.kvalheim.org ...

group of numbers
How can I make a bunch of numbers being recognized as a group? I've got the following numbers: 1, 2, 3, 4, 5 and 6. I want them to be considered as a group. How can I achieve it? Thank you for your attention --- Message posted from http://www.ExcelForum.com/ You can name the range of cells that contain the numbers. There are instructions here: http://www.contextures.com/xlNames01.html If that's not what you're trying to do, perhaps you could give a bit more detail. PeaceMaker < wrote: > How can I make a bunch of numbers being recognized as a group? > > I&...

How to get the digit number of a LONGLONG data?
How to get the digit number of a LONGLONG data? for example:LONGLONG aaa=123; then the digit number is 3; LONGLONG aaa=5678; then the digit number is 4; Another way is: int digits = 0; LONGLONG number = aaa; while (number > 0) { number /= 10; digits++; } Geo >-----Original Message----- >How to get the digit number of a LONGLONG data? >for example:LONGLONG aaa=123; then the digit number is 3; > LONGLONG aaa=5678; then the digit number is 4; > > >. > As long as the number isn't negative. "Geo" <ckarakiro@hotm...

Numbering
Hi, I am new to Word 2007 and am looking for a little be of help. hopefully someone knows the answer. I am creating a document with various headings. Having set-up my styles I have now encoutered a problem. I have various sections and the numbering is ok for Section A, however, when I reach Section B although the main heading is ok "2 SECTION B" (the numbering following from the main heading of SECTION A), the main body numbering follows of from Section A and does not restart. See example below At the present the document looks like this: 1 SECTION ...

transaction number #2
hi all while generating detailed sales report in mrms 1.3 we select transaction number to view journal of that particular bill,we find correct details in journal. But when we see in detailed sales report , we find items which are not a part of that journal displayed under transaction #. Is there query any problem in detailed sales report query in qrp reports. Rizwan, Have you tried to reindex the database? It's in the RMS Administrator under the database menu. Are you having any other issues with the software? Daniel techs1@nurol.com NuRol Point of Sale www.nurol.com 404-352-...

Calculated field options???
Here's my Data: Country Status --------- ---------- Canada Green Canada Blue Canada Green Canada Green Canada Blue In my pivot table, 'Country' is an item, and 'Status' is my only data field. What I really need to show in my data area is two column of data, one for 'Green' and one for 'Blue'. I tried creating two 'Calculated' fields with the following formulas, but they don't seem to be working: 'CalculatedField1' = IF((STATUS="Green"),1,0) 'CalculatedF...

How can I increse the number of rows?
Microsoft Excel has 65536 rows and I need more rows. Thanks. Use quattro pro. -- Gary''s Student "Miguel Arenas" wrote: > Microsoft Excel has 65536 rows and I need more rows. > > Thanks. No. Sorry. Use multiple worksheets. ************ Anne Troy www.OfficeArticles.com "Miguel Arenas" <MiguelArenas@discussions.microsoft.com> wrote in message news:44FED374-C997-45B6-BA4B-FF854194264C@microsoft.com... > Microsoft Excel has 65536 rows and I need more rows. > > Thanks. Then you need to use more sheets, or consider another application...

Assigning numbers to duplicates
I have some several fields that have duplicate Patient_ID and I would like to count those duplicates and assign them a number for example. Patient_ID Radiology 123 MRI 123 CT 123 MRI 127 CT 127 CT 138 CT I have been using the Total Count in the query but it summarizes the count for all Patients what I need is this: Patient_ID Radiology Count_Per_Patient 123 MRI 1 123 CT 2 123 MRI 3 127 CT 1 127 CT 2 138 CT ...

Page Numbers across worksheets
Does anyone know how to setup page numbers in the footer that will print continuously across worksheets when you chose print entire workbook from Excel 2000 or later? The closest I was able to come was to print the tab name so that the pages came out as worksheet1 page1 Worksheet1 Page2, Worksheet2 Page 1, Worksheet3, Page 1 Etc. Thanks! Daryl You just press the CTRL key and click the specified worksheets tab, then use print preview (or print directly), you may find out the page number is continously. HTH Harry "Daryl G." <Not@Provided.com> �b�l�� news:ejJBNJBeDHA.1832@...

tenure calculations
how can I format several dates such as 04/19/2003, 04/01/2004, etc. int a yearly average for the employee tenure -- Message posted from http://www.ExcelForum.com right now say I have my yearly figures in i1-i9. The formula I though would work is =today()-average(i1:i9), but how would i format this to give me yearly read out -- Message posted from http://www.ExcelForum.com Hi djackson! One way is to use YEARFRAC with a third argument of 1 to get your tenures in years and fractions of a year and then average the result. However YEARFRAC does produce some annoying but small errors. Y...

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Formula to calculate time
I was wondering if anybody knows of a formula to allow you to do calculations based on time. In other words, say I want to put a list of songs on a CD and their durations. Then, I want to add up the durations to get the full time of the CD, or my specific play list. So for example, using the information below: Ghostbusters - Ray Parker Jr. --- 5:23 (Just a guess) Phantom of the Opera Overture --- 3:55 (Another guess) Instead of 8:78, I'd want to see 9:18 Can this be done? Any help would be greatly appreciated. Thank you! -- Have a nice day! ~Paul Express Scripts, Charting the futu...

negative numbers #7
When trying to enter a negative number, such as -1, excel changes it to 01. samr414 Wrote: > When trying to enter a negative number, such as -1, excel changes it t > 01. I have been trying to duplicate this situation and it just would no happen. Maybe, formatting your cell to GENERAL or NUMBER will help yo solve this -- BenjieLo ----------------------------------------------------------------------- BenjieLop's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1101 View this thread: http://www.excelforum.com/showthread.php?threadid=31439 I XL does this wh...

wrong account number in investment portfolio
My 401k investment has the incorrect account number so when I try to down load my latest transactions it see nothin. I can see the account number when I go to account details but it is grayed out so I can't change it. I just upgraded to 2004 deluxe so I could automatically download my transactions, but it won't happen until I can change the account number. Any ideas? Thanks. Delete the financial institution associated with the account and then begin anew. "Dan" <anonymous@discussions.microsoft.com> wrote in message news:1ce0a01c4530a$a9ba3e30$a401280a@phx.gbl.....

Insert calculated median field in pivottable
Anyone know how to get a median calculation in a pivot table? I've tried inserting a calculated field but it always sums the calculated field. Thanks, Joel Not supported in a pivot -- Regards, Peo Sjoblom (No private emails please) "Joel Schaefer" <joel@disintegrators.com> wrote in message news:ev4P0Nk6FHA.2616@TK2MSFTNGP15.phx.gbl... > Anyone know how to get a median calculation in a pivot table? I've tried > inserting a calculated field but it always sums the calculated field. > > Thanks, > > Joel > ...

Word 2008: What section number is cursor location?
In prior version the status bar at the bottom of window displayed the section number in which the cursor was located.<br> <br> This section number display is lost in Word 2008.<br> <br> How do you determine the section in which the cursor is located? Sorry--the feature is gone. Use Help | Send Feedback in Word to let MS know that you would like it back or visit here: http://www.microsoft.com/mac/suggestions.mspx In the meantime, while this is a very slow workaround, if you bring up the header and footer (use View | Header and Footer rather than clicking in the marg...