Home |
Search |
Today's Posts |
#29
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Wed, 8 Feb 2006 11:26:40 -0800, "cj" wrote:
ron this formula =MID(A1,FIND("cash",A1)-1,1)+MID(A1,FIND("office",A1)-1,1) works fine if i enter in a1 : 3cash 2office 1train or 3cash 2office,but returns with #value! error when i enter just 8cash or left blank for that day off. with the regex formula i can enter "-" for the blank day and my totals on the bottom still works and i can change and add combination of the words cash|cs|office|of and i can add extra words after them "3cash training 2office(front). I see what you mean. And I'm glad you've got something working for yourself. To return a zero when the descriptor does not exist, you could also use a formula like: =REGEX.MID(A1&"0","\d(?=descriptor|$)") or, for cash: =REGEX.MID(A1&"0","\d(?=cash|$)") or, to allow for the possibility of a <space between the number and the descriptor: =REGEX.MID(A1&"0","\d(?=\s*(descriptor|$))") --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help! How do you get excel to find the x(changes daily, marked in a cell from another formula) highest numbers in a group of numbers and sum them up? | Excel Worksheet Functions | |||
Checking Winning Numbers in the Lottery. | Excel Discussion (Misc queries) | |||
Sorting alphanumeric numbers | Excel Discussion (Misc queries) | |||
Converting Numbers to Text properly | Excel Discussion (Misc queries) | |||
Sorting when some numbers have a text suffix | Excel Discussion (Misc queries) |