RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Excel A1 reference style
Expression
^\$?(?(?=[0-9])[0-9]{1,5}:\$?[0-9]{1,5}|[A-Za-z]{1,2}(?(?=:):\$?[A-Za-z]{1,2}|(?(?!(\$?[0-9])):/$[A-Za-z]{1,2}|\$?[0-9]{1,5})(?(?=:):\$?[A-Za-z]{1,2}\$?[0-9]{1,5}|.)))
Description
Matches Excel's A1 reference style. Single Cell, absolute, reletive, mixed, whole row, whole column. Validates it all.
Matches
A10 | A10:A20 | $B$15:E15 | 5:5 | 5:10 | H:H | H:J | $A$10:$A$20
Non-Matches
55 | C: | $HHH:555555 | $C:55
Author Rating: Not yet rated. Mike Sportsman
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:25:10 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:23:32 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:18:52 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:18:37 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:17:47 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:17:32 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:17:27 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:16:57 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Title: Doesn't work for single digit references
Name: DrG
Date: 4/18/2013 12:16:47 PM
Comment:
Doesn't seem to work for single digit references such as A1. A10 is fine and A1:A2 is fine but just A1 or just A2 doesn't match.


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials