Excel - Find any cell with a specific format

Asked By Anthony
20-Nov-09 07:16 PM
I am looking for a formula I can use to determine whether a cell contains
variable data, but of a certain criteria.  For example, I am looking to
determine if column A has an Arizona license plate or any other plate.
Arizona's plates are ABC1234 format.  I tried to use an if statement
=IF(A2<>???####,"Out of State","Arizona Plate") but it returns as an error.
I put quotes around the ???#### and it looks for that specific format.  I
also tried FIND and SEARCH to no avail.

Further clarification: I want to return all these plates as "Arizona Plates"
- RBN5678, IRP0594, NEB7736, and I want to return all these plates as "Out of
State" - 324 ANE, HPE 382, A1 LNK23.  Thanks, as always!!
SUBSTITUTE
(1)
SUMPRODUCT
(1)
INDIRECT
(1)
ISNUMBER
(1)
FIND
(1)
CHAR
(1)
ROW
(1)
MID
(1)
  Billy Liddel replied to Anthony
20-Nov-09 08:44 PM
You test data shows that out of state plates have a space. If this is always
so you could use:

=IF(ISNUMBER(FIND(" ",A3)),"Out of State","Arizona Plate")

HTH
Peter
  MRT replied to Anthony
21-Nov-09 12:10 AM
=IF(
(LEN(SUBSTITUTE(A2," ",""))=7)
*(SUMPRODUCT(--(CHAR(ROW(INDIRECT("a65:a90")))=MID(A2,{1,2,3},1)))=3)
*(SUMPRODUCT(--(CHAR(ROW(INDIRECT("a48:a57")))=MID(A2,{4,5,6,7},1)))=4),

but only according to my interpretation, 3 [A to Z] + 4 [0-9].

HTH
--
MRT
Create New Account
help
count uppercase letters in a cell Excel Worksheet Discussions Windows XP (1) Microsoft Excel (1) SUBSTITUTE (1) SUMPRODUCT (1) FREQUENCY (1) INDIRECT (1) COLUMN (1) LOWER (1) One way, = SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1, {"A";"B";"C";"D";"E";"F"; Another one: = SUMPRODUCT(LEN(A1)-LEN SUBSTITUTE(A1, CHAR(ROW(INDIRECT("65:90"))), ""))) - - Biff Microsoft Excel MVP If we know that no text will be longer
13, IF(slope = "> 100%", Area*$Q$14)))))) Excel Worksheet Discussions Excel 2007 (1) Excel (1) SUBSTITUTE (1) INDIRECT (1) ISERROR (1) LEFT (1) FIND (1) TRIM (1) I assume that your data is In TABLE 1 (Sheet1) Paste this formula in H2 cell = IF(ISERROR(VALUE(LEFT(TRIM(SUBSTITUTE(SUBSTITUTE(A2, "???", "-"), "+", "")), FIND("-", TRIM(SUBSTITUTE(SUBSTITUTE(A2, "???", "-"), "+", "")))-1))), VALUE(SUBSTITUTE(SUBSTITUTE(A2, "???", "-"), "+", "")), VALUE(LEFT(TRIM(SUBSTITUTE(SUBSTITUTE(A2, "???", "-"), "+", "")), FIND("-", TRIM(SUBSTITUTE(SUBSTITUTE(A2, "???", "-"), "+", "")))-1))) Copy the
would return a result of 2. Any help is greatly appreciated. ME Excel Miscellaneous Discussions SUBSTITUTE (1) SUMPRODUCT (1) INDIRECT (1) CHAR (1) CODE (1) LEN (1) This can be done with an array formula G41. . . The following formula, entered into cell H41, should return 3: = SUM(LEN(G41)-LEN(SUBSTITUTE(G41, CHAR(ROW(INDIRECT("65:90"))), ""))) Remember, enter as array formula. Or just use = sumproduct(): = SUMPRODUCT(LEN(a1)-LEN(SUBSTITUTE(a1, CHAR(ROW(INDIRECT("65:90"))), ""))) (I changed the cell address to A1 from G41
Thanks for anything on this. Jim Excel Worksheet Discussions Microsoft Excel (1) Excel 2007 (1) SUBSTITUTE (1) SUMPRODUCT (1) Worksheet (1) INDIRECT (1) ROW (1) MID (1) One way: A1: 1+5+8 = SUMPRODUCT(- -MID(SUBSTITUTE(A1, "+", 0), ROW(INDIRECT("1:" & LEN(A1))), 1)) Result = 14 - - Biff Microsoft Excel MVP Hi, If you mean that
Indirect Function() - summing across sheets Excel Hi, I'm struggling to unnderstand what's wrong with the following, and after googling around I saw one comment that INDIRECT() was somewhat problematic if using across worksheets. I have several sheets, the first is named since these are variables. I've tried all sorts but am unable to get an INDIRECT() to work. The obvious = SUM(INDIRECT(A1&":"&A2&"!"&$B$1)) doesn't work, nor indeed something like = SUM(INDIRECT("'" & A1 & ":" & A2 &"'!"&$B$1)) or various other combinations using quotes around the A1 & A2 references _ _ Richard Buttrey Grappenhall, Cheshire, UK _ __ __ __ __ __ __ __ __ __ __ __ __ _ Excel Worksheet Discussions Excel 2007 (1) Sheets (1) SUMPRODUCT (1) Workbook (1) INDIRECT (1) ADDRESS (1) ROW (1) SUM (1) In article ¾ _ _ ¾ _ __ __ __ __ __ __ __ __ __ __ __ __ _ Sorry, Should 33:45 GMT, chaos.theory.nospam.removethis@zen.co.uk I do not believe that INDIRECT can be used to construct a 3D reference. However, with certain constraints, Laurent Longre (author