Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cj
 
Posts: n/a
Default extracting and adding numbers

i.m looking for a formula to extract and add hrs in a time sheet.

if a1 is 3cash 2office 2demo
i need a2(cash|office|pay) column to add the 3cash and 2office and
a3(demo|cs|tr) to extract the 2hrs in demo

the orders and combination can change and it could be just 1 dept
eg)a1 is 8pay then a2(cash|office|pay) = 8 and a3(demo|cs|tr) = 0
a1 is 5office 2demo then a2(cash|office|pay) = 5 and a3(demo|cs|tr) = 2
a1 is 2demo 4cash 3tr then a2(cash|office|pay) = 4 and a3(demo|cs|tr)
= 5

any suggestions?

thanks







  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt
 
Posts: n/a
Default extracting and adding numbers

It appears that you have multiple pieces of information in the cells. You
might want to consider using the SEARCH function to find where "cash"
"office" or "pay" are and use the MID function to get the dates.

"cj" wrote in message
...
i.m looking for a formula to extract and add hrs in a time sheet.

if a1 is 3cash 2office 2demo
i need a2(cash|office|pay) column to add the 3cash and 2office and
a3(demo|cs|tr) to extract the 2hrs in demo

the orders and combination can change and it could be just 1 dept
eg)a1 is 8pay then a2(cash|office|pay) = 8 and a3(demo|cs|tr) = 0
a1 is 5office 2demo then a2(cash|office|pay) = 5 and a3(demo|cs|tr) =
2
a1 is 2demo 4cash 3tr then a2(cash|office|pay) = 4 and a3(demo|cs|tr)
= 5

any suggestions?

thanks









  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default extracting and adding numbers

On Sat, 11 Feb 2006 01:36:27 -0800, "cj" wrote:

i.m looking for a formula to extract and add hrs in a time sheet.

if a1 is 3cash 2office 2demo
i need a2(cash|office|pay) column to add the 3cash and 2office and
a3(demo|cs|tr) to extract the 2hrs in demo

the orders and combination can change and it could be just 1 dept
eg)a1 is 8pay then a2(cash|office|pay) = 8 and a3(demo|cs|tr) = 0
a1 is 5office 2demo then a2(cash|office|pay) = 5 and a3(demo|cs|tr) = 2
a1 is 2demo 4cash 3tr then a2(cash|office|pay) = 4 and a3(demo|cs|tr)
= 5

any suggestions?

thanks







What went wrong with the previous suggestions?

=REGEX.MID(A1&"0","\d(?=descriptor|$)")

e.g: For cash and office:

=REGEX.MID(A1&"0","\d(?=cash|$)") + REGEX.MID(A1&"0","\d(?=office|$)")


--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cj
 
Posts: n/a
Default extracting and adding numbers

hi ron

thanks alot for your help, i didn't put the + between the 2 descriptors,
formula works great now. thanks again

"Ron Rosenfeld" wrote:

On Sat, 11 Feb 2006 01:36:27 -0800, "cj" wrote:

i.m looking for a formula to extract and add hrs in a time sheet.

if a1 is 3cash 2office 2demo
i need a2(cash|office|pay) column to add the 3cash and 2office and
a3(demo|cs|tr) to extract the 2hrs in demo

the orders and combination can change and it could be just 1 dept
eg)a1 is 8pay then a2(cash|office|pay) = 8 and a3(demo|cs|tr) = 0
a1 is 5office 2demo then a2(cash|office|pay) = 5 and a3(demo|cs|tr) = 2
a1 is 2demo 4cash 3tr then a2(cash|office|pay) = 4 and a3(demo|cs|tr)
= 5

any suggestions?

thanks







What went wrong with the previous suggestions?

=REGEX.MID(A1&"0","\d(?=descriptor|$)")

e.g: For cash and office:

=REGEX.MID(A1&"0","\d(?=cash|$)") + REGEX.MID(A1&"0","\d(?=office|$)")


--ron

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default extracting and adding numbers

On Sun, 12 Feb 2006 02:37:29 -0800, "cj" wrote:

hi ron

thanks alot for your help, i didn't put the + between the 2 descriptors,
formula works great now. thanks again


Good. I'm glad it seems to be working. If you should require more assistance,
please post back in the same thread (if you can) -- that makes it simpler for
me to follow up.

Best,

--ron
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
extracting numbers cj Excel Worksheet Functions 28 February 9th 06 03:01 AM


All times are GMT +1. The time now is 05:43 PM.

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

About Us

"It's about Microsoft Excel"