Determine Text Contents

MASONS4

New Member
Joined
Mar 4, 2009
Messages
21
Hi,

I've been struggling with a formula all afternoon, and am in desperate need of help for my own sanity.

I have a workflow system which automatically generates references. The system will generate a reference which is always prefixed "GOC-" and then will be followed by 6 numbers.

The issue is that users can also generate non-standard references (i.e. user generated references are free form).

So I'm trying to determine which are system ("First") generated and which are user ("Rework").

The formula I've been working on should check:

The first digits in each cell is "GOC-" a
The total length of the cell is 10 characters
Tthe last 6 digits in the cell are numeric, but it's not working.

=(IF(AND(FIND("GOC-",H2),(LEN(H2)=10),(ISNUMBER(RIGHT(H2,5)))),"First","Rework"))

The entry in cell H2 is GOC-229702, so it should return a value of "First"

Any help would be greatly appreciated.

Thanks in advance.

Sean
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
RIGHT returns a text string, even if it's made up of numeric characters. Try this:
=(IF(AND(FIND("GOC-",H2),(LEN(H2)=10),(NOT(ISERROR(RIGHT(H2,5)+0)))),"First","Rework"))
 
Upvote 0
Hi,

Just an observation, I thought we were checking the right 6 digits, not 5.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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
Back
Top