SOLVED
Home

How to conditionally format a cell that has two numbers instead of one?

%3CLINGO-SUB%20id%3D%22lingo-sub-1000406%22%20slang%3D%22en-US%22%3EHow%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1000406%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20column%20that%20has%20text%20with%20activities%20that%20field%20technicians%20completed%20on%20meters.%20In%20this%20column%2C%20they%20input%20a%20meter%20%23.%20However%2C%20sometimes%20they%20accidentally%20could%20input%20two%20meter%20%23's.%20I%20am%20interested%20in%20somehow%20conditionally%20formatting%20this%20column%20for%20each%20cell%2C%20that%20if%20they%20do%20have%20two%20meter%20%23's%20somewhere%20in%20the%20paragraph%20described%2C%20that%20it%20will%20flag%20the%20cell%20(color%20code%2C%20etc.).%20Each%20meter%20%23%20is%20six%20digits%20long%2C%20so%20is%20there%20a%20way%20I%20could%20just%20search%20each%20cell%2C%20see%20if%20there%20exists%20two%20six%20digit%20numbers%20in%20that%20cell%2C%20and%20flag%20it%3F%20Or%20should%20I%20search%20each%20cell%20by%20text%20(look%20for%20%22meter%22%20twice%20in%20the%20paragraph%2C%20flag%20it)%3F%20Is%20this%20even%20possible%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1000406%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1000440%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1000440%22%20slang%3D%22en-US%22%3EIf%20it's%20possible%20to%20change%20the%20way%20the%20sheet%20is%20designed%2C%20why%20not%20add%20a%20column%20that%20is%20solely%20for%20the%20meter%20%23%2C%20set%20it%20so%20it%20accepts%20(Data...Validation)%20nothing%20longer%20than%20six%20digits.%20That%20would%20be%20a%20more%20robust%20way%20to%20handle%20this%20in%20the%20first%20place.%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20some%20particular%20reason%20why%20you%20use%20Excel%20for%20this%20business%20purpose%20in%20the%20first%20place%3F%20Does%20the%20worksheet%20also%20track%20hours%20or%20expenses%20associated%20with%20a%20call%2C%20for%20example%3F%20Assuming%20that%20is%20the%20case%2C%20it%20makes%20even%20more%20sense%20that%20the%20Meter%20Number%20be%20its%20own%20cell%2Fcolumn.%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20you%20want%20further%20assistance%20or%20suggestions%2C%20might%20I%20ask%20that%20you%20upload%20a%20sample%20or%20two%20of%20the%20way%20it%20looks%20now%2C%20i.e.%2C%20a%20representative%20spreadsheet%20with%20some%20filled%20in%20as%20you%20want%2C%20and%20one%20or%20two%20that%20are%20not.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1001109%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1001109%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20each%20Meter%23%20consists%20of%206%20digits%20and%20more%20than%20one%20Meter%23%20is%20entered%20in%20the%20same%20cell%2C%20they%20must%20be%20separated%20by%20a%20delimiter.%20Is%20it%20the%20case%3F%3C%2FP%3E%3CP%3EIf%20so%2C%20you%20can%20simply%20check%20the%20length%20of%20the%20cell%20content%20and%20if%20it%20is%20greater%20than%2012%20that%20simply%20means%20there%20are%20more%20than%20one%20Meter%23%20present%20in%20the%20same%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20your%20Meter%23%20are%20in%20column%20A%2C%20then%20select%20the%20whole%20column%20A%20(when%20you%20select%20the%20whole%20column%20A%2C%20cell%20A1%20will%20be%20Active%20Cell%20in%20the%20Selection)%20and%20make%20a%20new%20rule%20for%20conditional%20formatting%20using%20the%20formula%20given%20below%20and%20set%20the%20format%20as%20per%20your%20choice.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DLEN(A1)%26gt%3B12%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20make%20sure%20that%20the%20cell%20referred%20in%20the%20formula%20must%20be%20the%20first%20cell%20in%20the%20range%20in%20which%20you%20are%20applying%20the%20conditional%20formatting.%3C%2FP%3E%3CP%3Ee.g.%20if%20you%20want%20to%20apply%20the%20conditional%20formatting%20to%20the%20range%20D2%3AD100%20(assuming%20that%20the%20Meter%23%20are%20in%20column%20D%20where%20D1%20is%20the%20column%20header)%2C%20select%20the%20range%20D2%3AD100%20and%20use%20the%20below%20formula%20for%20the%20conditional%20formatting...%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DLEN(D2)%26gt%3B12%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20that%20doesn't%20work%20as%20expected%2C%20please%20upload%20a%20small%20sample%20file%20so%20that%20we%20can%20suggest%20a%20working%20solution%20considering%20your%20existing%20data.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1001216%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1001216%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394231%22%20target%3D%22_blank%22%3E%40Subodh_Tiwari_sktneer%3C%2FA%3EIt's%20possible%20that%20one%20of%20us%20has%20mis-interpreted%20the%20orginal%20post%20by%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk.%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20read%20it%20to%20mean%20that%20the%20potential%20for%20two%20Meter%20Numbers%20is%20to%20be%20%22buried%22%20in%20a%20longer%20text%20entry%20describing%20work%20done%20by%20a%20technician%20on%20the%20meter%20in%20question.%20It's%20not%20just%20the%20entry%20of%20the%20meter%20number%2C%20in%20other%20words.%20If%20you%20are%20right%2C%20on%20the%20other%20hand%2C%20your%20suggestion%20will%20do%20the%20trick%20by%20highlighting%20the%20cell%20if%20it%20contains%20more%20than%20six%20figures.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEither%20way%2C%20though%2C%20both%20of%20us%20have%20asked%20for%20an%20uploading%20of%20an%20example%20of%20what%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk%3C%2FA%3E%26nbsp%3B%20is%20working%20on....always%20easier%20to%20work%20with%20an%20actual%20example.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1001217%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1001217%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20I%20agree%20with%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002125%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002125%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20are%20correct%2C%20the%20numbers%20are%20buried%20within%20text.%20I%20will%20upload%20some%20data%20for%20better%20reference.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002174%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002174%22%20slang%3D%22en-US%22%3E%3CP%3EHere%20is%20a%20screenshot%20of%20the%20column%20of%20%22Remarks%22%20where%20the%20meter%20numbers%20would%20be%20documented%20in.%20There%20are%20over%2011%2C000%20rows%2C%20which%20is%20why%20I%20was%20wondering%20if%20there%20was%20an%20easier%20way%20to%20flag%20cells%20that%20have%20two%20meter%20numbers%20written%20in%20them.%20Also%2C%20I%20apologize%2C%20but%20it%20appears%20meter%20numbers%20are%207%20digits%20long.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F156449iA5E736E7CD060B87%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002209%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002209%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk%3C%2FA%3EOh%2C%20my.%20What%20a%20tangled%20mess%20(if%20you'll%20excuse%20me).%20The%20fact%20that%20meter%20numbers%20are%20seven%20digits%20is%20not%20an%20issue.%20What%20makes%20this%20awfully%20difficult%20to%20sort%20out%20is%20that%20there%20are%20%3CEM%3E%3CSTRONG%3EOTHER%3C%2FSTRONG%3E%3C%2FEM%3E%20numbers%20in%20the%20same%20remarks%20(as%20I%20expected%2C%20frankly).%20So%2C%20although%20you%20could%20write%20a%20rule%20to%20get%20only%20seven%20digit%20numbers%20and%20somehow%20flag%20it%2C%20what%20you%20really%20need%20is%20a%20redesigned%20spreadsheet.%3C%2FP%3E%3CP%3ESome%20questions%20for%20you.%3C%2FP%3E%3COL%3E%3CLI%3EIn%20that%20screen%20shot%2C%20it's%20not%20clear%20if%20those%20entries%20all%20refer%20to%20a%20single%20customer%2C%20or%20is%20each%20cell%20a%20different%20customer%2Fservice%20call%3F%3CUL%3E%3CLI%3EIf%20the%20latter%2C%20then%20why%20isn't%20the%20meter%20number%20part%20of%20each%20cell%3F%3C%2FLI%3E%3CLI%3EIf%20the%20former%2C%20then%20it's%20going%20to%20be%20even%20harder%20to%20sort%20out.%20Good%20database%20design%20would%20have%20one%20row%20(perhaps%20with%20wordwrap%20that%20allows%20multiple%20lines%20in%20the%20comment%20cell)%20per%20service%20call.%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EWhat%20are%20the%20other%20columns%3F%20If%20there%20aren't%20any%20other%20columns%2C%20why%20are%20you%20using%20Excel%20in%20the%20first%20place%3F%20You%20could%20use%20Word%20to%20record%20comments.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EI'm%20going%20to%20assume%20that%20there%20are%20other%20columns%2C%20where%20you%20record%20such%20things%20as%20%22Time%20Spent%22%20or%20other%20things%20for%20billing%2Faccounting%20purposes.%20Based%20on%20that%20assumption%2C%20I'm%20going%20to%20go%20back%20to%20my%20first%20suggestion%2C%20which%20was%20to%20add%20a%20column%20in%20which%20Meter%20Number%20is%20to%20be%20entered%2C%20and%20set%20it%20up%20with%20Data--Validate%20such%20that%20only%20a%20maximum%20of%20seven%20digits%20can%20be%20entered.%20Yes%2C%20this%20will%20be%20a%20lot%20of%20work.%20Think%20of%20it%20as%20a%20learning%20experience.%3C%2FP%3E%3CP%3EI've%20attached%20a%20sample%20showing%20how%20that%20data%20validation%20works.%20If%20you%20can%20upload%20a%20portion%20of%20the%20actual%20spreadsheet%20(showing%20other%20columns%20as%20well)%2C%20I'd%20be%20happy%20to%20look%20at%20it%20further.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002212%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002212%22%20slang%3D%22en-US%22%3E%3CP%3EEach%20cell%20is%20a%20different%20customer%2Fcall.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F156451iCEF6FF53AF57990A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThank%20you%20for%20looking%20at%20this.%20The%20above%20screenshot%20shows%20all%20columns.%20I%20highlighted%20every%20cell%20that%20contains%20%22METER%22%20or%20%22MTR%22%20thus%20far%20to%20help%20narrow%20it%20perhaps.%20But%20still%20would%20require%20a%20lot%20of%20work.%20It%20is%20a%20mess!%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002251%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002251%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk%3C%2FA%3ESo%20you%20actually%20DO%20have%20meter%20number%20as%20a%20column%20of%20its%20own%20already%20(although%20I'd%20say%20it's%20ten%20digits%20long%2C%20given%20the%20%22100nnnnnnn%22%20format).%20And%20there%20are%20more%20than%20a%20few%20entries%20under%20the%20%22Remarks%22%20column%20where%20there%20is%20no%20reference%20to%20meter%20number.%20In%20your%20sample%2C%20unless%20I%20missed%20it%20(entirely%20possible)%2C%20I%20didn't%20see%20any%20that%20referred%20to%20more%20than%20one%20meter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20question%20now%20is%3A%20How%20important%20is%20it%20that%20you%20identify%20the%20remarks%20that%20refer%20to%20more%20than%20one%3F%20What%20management%20or%20business%20purpose%20is%20served%20by%20those%20remarks%20other%20than%20documentation%20that%20a%20call%20was%20made%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20racking%20my%20brain%20to%20see%20if%20I%20can%20think%20of%20a%20way%20to%20re-think%20the%20function%20of%20reporting%20these%20service%20calls%20that%20would%20prevent%20the%20problem%20from%20happening%20in%20the%20first%20place.%20For%20now%2C%20even%20though%20there%20are%2011%2C000%20entries%2C%20it%20seems%20to%20me%20that%20eye-balling%20and%20fixing%20would%20be%20warranted.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002518%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002518%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F454531%22%20target%3D%22_blank%22%3E%40npshibzk%3C%2FA%3E%26nbsp%3B%26nbsp%3B%20Just%20re%3Dreading%20what%20you%20wrote%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EI%20highlighted%20every%20cell%20that%20contains%20%22METER%22%20or%20%22MTR%22%20thus%20far%20to%20help%20narrow%20it%20perhaps.%3C%2FEM%3E%3C%2FP%3E%3CP%3EDid%20you%20do%20that%20highlighting%20using%20conditional%20formatting%3F%20Or%20was%20that%20a%20manual%20thing%20just%20for%20this%20posting%3F%20If%20you%20did%20it%20yourself%20using%20conditional%20formatting%2C%20maybe%20that's%20your%20quick%20and%20dirty%20solution.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EBut%20still%20would%20require%20a%20lot%20of%20work.%20It%20is%20a%20mess!%3C%2FEM%3E%3C%2FP%3E%3CP%3EYep.%20But%20a%20series%20of%20manual%20fixes%2C%20accelerated%20by%20just%20searching%20for%20METER%2C%20MTR%2C%20or%20even%20%23....%20and%20you%20could%20do%20that%20using%20a%20%22helper%20column%22%20next%20to%20the%20%22Remarks%22%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20fact%2C%20after%20writing%20that%2C%20%3CSTRONG%3EI%20went%20and%20wrote%20the%20formula%20for%20you.%20Here%20it%20is.%20I%20added%20multiple%20helper%20columns%2C%20with%20a%20%22search%20term%22%20at%20the%20top....%20you%20could%20extend%20this.%20As%20you%20see%2C%20it%20will%20pick%20up%20and%20highlight%20the%20row%20that%20contains%20METER%2C%20meter%2C%20MTR%2C%20mtr%2C%20%23.%20and%20any%20combination%20of%20those.....%26nbsp%3B%26nbsp%3B%20So%20all%20you%20need%20to%20do%20is%20put%20some%20temporary%20helper%20columns%20next%20to%20your%20%22Remarks%22%20and%20copy%20these%20formulas%20down%20all%2011%2C000%20rows.%20It'll%20still%20be%20work%2C%20but%20that%20should%20accelerate%20it.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002657%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002657%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20so%20much!%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1002833%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20conditionally%20format%20a%20cell%20that%20has%20two%20numbers%20instead%20of%20one%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1002833%22%20slang%3D%22en-US%22%3EYou%20are%20very%20welcome.%20It's%20fun%20to%20take%20on%20these%20challenges%2C%20and%20it's%20great%20to%20actually%20come%20to%20a%20solution%20that%20works.%3C%2FLINGO-BODY%3E
Highlighted
npshibzk
Occasional Contributor

Hello all,

 

I have a column that has text with activities that field technicians completed on meters. In this column, they input a meter #. However, sometimes they accidentally could input two meter #'s. I am interested in somehow conditionally formatting this column for each cell, that if they do have two meter #'s somewhere in the paragraph described, that it will flag the cell (color code, etc.). Each meter # is six digits long, so is there a way I could just search each cell, see if there exists two six digit numbers in that cell, and flag it? Or should I search each cell by text (look for "meter" twice in the paragraph, flag it)? Is this even possible?

12 Replies
If it's possible to change the way the sheet is designed, why not add a column that is solely for the meter #, set it so it accepts (Data...Validation) nothing longer than six digits. That would be a more robust way to handle this in the first place.

Is there some particular reason why you use Excel for this business purpose in the first place? Does the worksheet also track hours or expenses associated with a call, for example? Assuming that is the case, it makes even more sense that the Meter Number be its own cell/column.

If you want further assistance or suggestions, might I ask that you upload a sample or two of the way it looks now, i.e., a representative spreadsheet with some filled in as you want, and one or two that are not.

@npshibzk 

If each Meter# consists of 6 digits and more than one Meter# is entered in the same cell, they must be separated by a delimiter. Is it the case?

If so, you can simply check the length of the cell content and if it is greater than 12 that simply means there are more than one Meter# present in the same cell.

 

Assuming your Meter# are in column A, then select the whole column A (when you select the whole column A, cell A1 will be Active Cell in the Selection) and make a new rule for conditional formatting using the formula given below and set the format as per your choice.

 

=LEN(A1)>12

 

Please make sure that the cell referred in the formula must be the first cell in the range in which you are applying the conditional formatting.

e.g. if you want to apply the conditional formatting to the range D2:D100 (assuming that the Meter# are in column D where D1 is the column header), select the range D2:D100 and use the below formula for the conditional formatting...

=LEN(D2)>12

 

If that doesn't work as expected, please upload a small sample file so that we can suggest a working solution considering your existing data.

@Subodh_Tiwari_sktneerIt's possible that one of us has mis-interpreted the orginal post by @npshibzk. 

I read it to mean that the potential for two Meter Numbers is to be "buried" in a longer text entry describing work done by a technician on the meter in question. It's not just the entry of the meter number, in other words. If you are right, on the other hand, your suggestion will do the trick by highlighting the cell if it contains more than six figures.

 

Either way, though, both of us have asked for an uploading of an example of what @npshibzk  is working on....always easier to work with an actual example.

You are correct, the numbers are buried within text. I will upload some data for better reference. @mathetes 

Here is a screenshot of the column of "Remarks" where the meter numbers would be documented in. There are over 11,000 rows, which is why I was wondering if there was an easier way to flag cells that have two meter numbers written in them. Also, I apologize, but it appears meter numbers are 7 digits long.

clipboard_image_0.png

@mathetes 

@npshibzkOh, my. What a tangled mess (if you'll excuse me). The fact that meter numbers are seven digits is not an issue. What makes this awfully difficult to sort out is that there are OTHER numbers in the same remarks (as I expected, frankly). So, although you could write a rule to get only seven digit numbers and somehow flag it, what you really need is a redesigned spreadsheet.

Some questions for you.

  1. In that screen shot, it's not clear if those entries all refer to a single customer, or is each cell a different customer/service call?
    • If the latter, then why isn't the meter number part of each cell?
    • If the former, then it's going to be even harder to sort out. Good database design would have one row (perhaps with wordwrap that allows multiple lines in the comment cell) per service call.
  2. What are the other columns? If there aren't any other columns, why are you using Excel in the first place? You could use Word to record comments.

I'm going to assume that there are other columns, where you record such things as "Time Spent" or other things for billing/accounting purposes. Based on that assumption, I'm going to go back to my first suggestion, which was to add a column in which Meter Number is to be entered, and set it up with Data--Validate such that only a maximum of seven digits can be entered. Yes, this will be a lot of work. Think of it as a learning experience.

I've attached a sample showing how that data validation works. If you can upload a portion of the actual spreadsheet (showing other columns as well), I'd be happy to look at it further.

Each cell is a different customer/call. 

 

clipboard_image_0.png

Thank you for looking at this. The above screenshot shows all columns. I highlighted every cell that contains "METER" or "MTR" thus far to help narrow it perhaps. But still would require a lot of work. It is a mess!

@mathetes 

@npshibzkSo you actually DO have meter number as a column of its own already (although I'd say it's ten digits long, given the "100nnnnnnn" format). And there are more than a few entries under the "Remarks" column where there is no reference to meter number. In your sample, unless I missed it (entirely possible), I didn't see any that referred to more than one meter.

 

My question now is: How important is it that you identify the remarks that refer to more than one? What management or business purpose is served by those remarks other than documentation that a call was made?

 

I'm racking my brain to see if I can think of a way to re-think the function of reporting these service calls that would prevent the problem from happening in the first place. For now, even though there are 11,000 entries, it seems to me that eye-balling and fixing would be warranted.

Solution

@npshibzk   Just re=reading what you wrote:

 

I highlighted every cell that contains "METER" or "MTR" thus far to help narrow it perhaps.

Did you do that highlighting using conditional formatting? Or was that a manual thing just for this posting? If you did it yourself using conditional formatting, maybe that's your quick and dirty solution.

 

But still would require a lot of work. It is a mess!

Yep. But a series of manual fixes, accelerated by just searching for METER, MTR, or even #.... and you could do that using a "helper column" next to the "Remarks" column.

 

In fact, after writing that, I went and wrote the formula for you. Here it is. I added multiple helper columns, with a "search term" at the top.... you could extend this. As you see, it will pick up and highlight the row that contains METER, meter, MTR, mtr, #. and any combination of those.....   So all you need to do is put some temporary helper columns next to your "Remarks" and copy these formulas down all 11,000 rows. It'll still be work, but that should accelerate it.

 

You are very welcome. It's fun to take on these challenges, and it's great to actually come to a solution that works.
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies