{"id":3226,"date":"2007-08-02T13:36:54","date_gmt":"2007-08-02T17:36:54","guid":{"rendered":"http:\/\/scruss.com\/blog\/2007\/08\/02\/excel-alpha-code-to-numbers\/"},"modified":"2007-08-02T13:36:54","modified_gmt":"2007-08-02T17:36:54","slug":"excel-alpha-code-to-numbers","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2007\/08\/02\/excel-alpha-code-to-numbers\/","title":{"rendered":"excel: alpha code to numbers"},"content":{"rendered":"<p>I use an annoying program that labels its output A..Z, AA..AZ, BA &#8230; rather than numerically from 1. This is annoying, as a spreadsheet won&#8217;t sort it correctly (it does A, AA, AB &#8230;). The following code will convert this code to the right numbers, assuming your alpha code is in cell B3:<\/p>\n<p><code>=IF(LEN(B3)=1,CODE(B3)-64,26*(CODE(B3)-64)+CODE(RIGHT(B3))-64)<\/code><\/p>\n<p>This will only work for codes of two characters or less, and is case sensitive. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use an annoying program that labels its output A..Z, AA..AZ, BA &#8230; rather than numerically from 1. This is annoying, as a spreadsheet won&#8217;t sort it correctly (it does A, AA, AB &#8230;). The following code will convert this code to the right numbers, assuming your alpha code is in cell B3: =IF(LEN(B3)=1,CODE(B3)-64,26*(CODE(B3)-64)+CODE(RIGHT(B3))-64) This [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[725,255,726],"class_list":["post-3226","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-alpha","tag-excel","tag-spreadsheet"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-Q2","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/3226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=3226"}],"version-history":[{"count":0,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/3226\/revisions"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=3226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=3226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=3226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}