Ravindra Bagale · Excelसर्व coursesया course चे lessonsशोधाEnglish

Excel · मराठी आवृत्ती

Excel

5.12 Pincodes आणि leading zeros असलेले codes

या page मध्ये

आधीचा data

Store Pincode (raw) SKU (raw)
Kothrud 411038.0 4512
Gangapur Road 422 013 87
Sitabuldi 440012 1203
Hotgi Road 41 3003 9

Clean केल्यावर

Store Pincode SKU
Kothrud 411038 004512
Gangapur Road 422013 000087
Sitabuldi 440012 001203
Hotgi Road 413003 000009

भारतीय PIN code सहा digits चा असतो; leading zero नसतो. SKU किंवा employee code मध्ये मात्र zeros अर्थपूर्ण असू शकतात. म्हणून field चा business meaning समजून घ्या.

Steps

  1. Sample pincode मधले spaces/.0 numeric formatting clean करून सहा-character display: =TEXT(VALUE(SUBSTITUTE(B2," ","")),"000000"). पण missing digit असलेल्या invalid PIN ला zero लावून valid समजू नका.
  2. Fixed six-digit SKU standard असल्याचं ठरलं असेल तर raw SKU C2 पासून =TEXT(C2,"000000") करा. Output वेगळ्या column मध्ये ठेवा.
  3. फक्त number padded दिसायला हवा असेल तर custom format 000000. यात underlying value numberच राहते.
  4. Import वेळी Power Query / Text Import Wizard मध्ये code columns Text ठेवा, म्हणजे original zeros जात नाहीत.

Practice

Known six-digit SKUs restore करा. Spaces आणि .0 असलेले sample pincodes clean करा. दिलेल्या Pune sample list साठी =LEFT(C2,3)="411" हा expected-prefix check करून पाहा; हा सर्व Pune जिल्ह्याचा सार्वत्रिक नियम म्हणून वापरू नका.