SOLVED

Formulas

%3CLINGO-SUB%20id%3D%22lingo-sub-1425194%22%20slang%3D%22en-US%22%3EFormulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425194%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20have%20a%20range%20where%20each%20categories%20has%20notes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20find%20the%20below%20condition%20where%201%2C%202%20are%20the%20volumes.%3C%2FP%3E%0A%3CP%3ECM-%20Account%20Credit%20(contl)%20category%20should%20be%26nbsp%3B1-Credit%20or%202-hold%20or%201-rejected%20and%20it%20has%20to%20throw%20error%20if%20the%20notes%20are%20not%20matching.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%22288%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22127%22%3E%26nbsp%3BCategory%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3ENotes%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM-%20Account%20Credit%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E1-Credit%20or%201-hold%20or%201-rejected%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM%20-%20Account%20Transfer%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E2-transfer%20or%202-%20rejected%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM%20-%20Account%20Closed%20(util)%3C%2FTD%3E%0A%3CTD%3EClosed%2C%20Dormant%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1425194%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425372%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425372%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%20you%20can%20use%20%22Data%20Validation%22%20and%20choose%20%22custom%22%20and%20enter%20a%20formula%20like%20the%20following%20assuming%20B%20is%20category%20and%20C%20is%20note%20and%20you%20start%20validation%20in%20row%202%3A%3C%2FP%3E%3CP%3E%3DOR(AND(B2%3D%22category%201%22%2COR(C2%3D%22comment%201%22%2CC2%3D%22comment%202%22%2CC2%3D%22comment%203%22))%2C%20AND(B2%3D%22category%202%22%2COR(C2%3D%22comment%204%22%2CC2%3D%22comment%205%22))%2C%20AND(B2%3D%22category%203%22%2COR(C2%3D%22comment%206%22%2CC2%3D%22comment%207%22)))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehopefully%20you%20can%20substitute%20the%20proper%20text%20in%20each%20case%20you%20want.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425696%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425696%22%20slang%3D%22en-US%22%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%20for%20the%20response.%3CBR%20%2F%3E%3CBR%20%2F%3EBut%20the%20problem%20is%20notes%20or%20comments%20will%20not%20be%20same%20as%20it%20changes%20as%20per%20the%20volume%3CBR%20%2F%3E%3CBR%20%2F%3ENotes%20for%20CM-%20Account%20Credit%20(contl)%20will%20be%3CBR%20%2F%3Evolume%20processed-Credit%20%3CBR%20%2F%3Evolume%20processed-rejected%3CBR%20%2F%3Evolume%20processed-hold%3CBR%20%2F%3E%3CBR%20%2F%3EFormula%20should%20be%20number-notes%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425949%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425949%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20attach%20your%20sample%20file%20with%20data%20and%20desired%20results%20therein.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425989%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20LOOKUP%20function%20and%20make%20this%20dynamic%20array.%3C%2FP%3E%3CP%3ELOOKUP(field%20to%20search%2C%20first%20column%20where%20search%20is%20being%20done%2C%20what%20to%20return%20when%20search%20is%20matched).%3C%2FP%3E%3CP%3ETry%20this%20and%20confirm%20if%20this%20is%20feasible%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426261%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426261%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F665807%22%20target%3D%22_blank%22%3E%40ShishirKumar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20find%20the%20attached%20sample%20file%20and%20help%20him%20to%20get%20the%20desired%20result.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EColumn%20A-%20Category%3C%2FP%3E%0A%3CP%3EColumn%20B-%20Notes%3C%2FP%3E%0A%3CP%3EColumn%20C-%20Manually%20I%20checked%20whether%20Category%20matching%20with%20the%20notes%20or%20not%26nbsp%3B%3C%2FP%3E%0A%3CP%3EColumn%20D-%20Please%20add%20the%20formula%20to%20check%20whether%20the%20correct%20notes%20selected%20for%20correct%20category%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%3A%20CM-%20Account%20Credit%20(contl)%20and%20CM%20-%20Account%20Transfer%20(contl)----Number-Notes(%20No%20Spaces)%3C%2FP%3E%0A%3CP%3EFor%20Category%26nbsp%3BCM%20-%20Account%20Closed%20(contl)-%20notes%20should%20be%20without%20number%20ie%20Closed%20or%20Dormant%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426320%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426320%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20clarify%20the%20logic%20a%20bit%20more.%20For%20example%2C%20in%20left%20table%3C%2FP%3E%0A%3CTABLE%20width%3D%22445%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22210%22%3ECM-%20Account%20Credit%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22171%22%3E1-%20credit%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3EError%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3Ehaving%201-credit%20for%20this%20category%20in%20right%20table%2C%20but%3C%2FP%3E%0A%3CTABLE%20width%3D%22445%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22210%22%3ECM-%20Account%20Credit%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22171%22%3E3-credit%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3ENo%20Error%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3Ehas%20no%20error.%20If%20we%20ignore%20numbers%2C%20both%20shall%20return%20No%20Error.%20If%20not%2C%20it%20shall%20be%20an%20opposite.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426419%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426419%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B-%20There%20is%20space%20after%20hyphen%2C%20so%20it%20is%20error.%3C%2FP%3E%0A%3CTABLE%20width%3D%22445%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22210%22%3ECM-%20Account%20Credit%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22171%22%3E1-%20credit%3C%2FTD%3E%0A%3CTD%20width%3D%2264%22%3EError%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426447%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426447%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%20So%20if%20I%20understand%20correctly%20the%20note%20should%20have%20a%20number%20followed%20by%20%22-Credit%22%20or%20%22-rejected%22%20etc...%20%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20recommend%20that%20you%20split%20those%20into%202%20separate%20columns%20to%20make%20your%20life%20easier%20and%20the%20sheet%20more%20functional.%26nbsp%3B%20If%20you%20need%20a%20column%20with%20that%20specific%20format%20you%20can%20%22build%22%20it.%26nbsp%3B%20For%20example%20you%20have%201%20col%20that%20is%20%23%20and%20another%20column%20that%20is%20action%20(e.g.%20credit%20vs%20rejected%20etc...).%26nbsp%3B%20You%20can%20have%20specific%20controls%20on%20each%20of%20those%20columns.%26nbsp%3B%20The%20a%203rd%20col%20that%20would%20TEXTJOIN%20those%202%20columns%20with%20an%20%22-%22%20or%20in%20the%20last%20case%20just%20where%20there%20are%20no%20numbers%20just%20use%20the%20later%20col.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20said%2C%20if%20you%20still%20want%20to%20limit%20the%20entry%20to%20only%20that%20format%20you%20can%20make%20the%20validation%20formula%20more%20complicated.%26nbsp%3B%20Here%20is%20an%20example%20where%20I%20changed%20the%20Data%20Validation%20formula%20above%20using%20the%20search%20function%20to%20make%20sure%20at%20least%20the%20non-numbered%20part%20is%20correct%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DOR(AND(B2%3D%22category%201%22%2COR(search(%22comment%201%22%2CC2)%2Csearch(%22comment%202%22%3CSPAN%3E%2CC2)%2Csearch(%3C%2FSPAN%3E%22comment%203%22%2CC2)))%2C%20AND(B2%3D%22category%202%22%2COR(search(%22comment%204%22%3CSPAN%3E%2CC2)%2Csearch(%3C%2FSPAN%3E%22comment%205%22%2CC2)))%2C%20AND(B2%3D%22category%203%22%2COR(search(%22comment%206%22%3CSPAN%3E%2CC2)%2Csearch(%3C%2FSPAN%3E%22comment%207%22%2CC2))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426497%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426497%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20also%20recommend%20to%20re-design%20right%20table%20a%20bit%20as%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20566px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195337i73236D12760EB791%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Ewith%20Helper%20column%20calculated%20as%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DTRIM(IFERROR(%0A%20%20%20%20%20RIGHT(%0A%20%20%20%20%20%20%20%24H%243%3AINDEX(%24H%243%3A%24H%24100%2CCOUNTA(%24H%243%3A%24H%24100))%2C%0A%20%20%20%20%20%20%20LEN(%24H%243%3AINDEX(%24H%243%3A%24H%24100%2CCOUNTA(%24H%243%3A%24H%24100)))%20-%0A%20%20%20%20%20%20%20FIND(%22-%22%2C%24H%243%3AINDEX(%24H%243%3A%24H%24100%2CCOUNTA(%24H%243%3A%24H%24100))))%2C%0A%20%24H%243%3AINDEX(%24H%243%3A%24H%24100%2CCOUNTA(%24H%243%3A%24H%24100))))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStatus%20could%20be%20calculated%20as%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20554px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F195346i4BE52F81CABE939E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Eby%20formula%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(COUNTIFS(%0A%20%20%20%20%24G%243%3AINDEX(%24G%243%3A%24G%24100%2CCOUNTA(%24G%243%3A%24G%24100))%2C%0A%20%20%20%20%24A2%2C%0A%20%20%20%20%24I%243%3A%24I%249%2C%0A%20%20%20%20IFERROR(RIGHT(%24B2%2CLEN(%24B2)-FIND(%22-%22%2C%24B2))%2C%24B2)%0A)%2C%22No%20Error%22%2C%20%22Error%22)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426567%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426567%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280482%22%20target%3D%22_blank%22%3E%40Twifoo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20find%20the%20attached%20file%20for%20your%20reference.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20width%3D%22288%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22127%22%3E%26nbsp%3BCategory%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3ENotes%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM-%20Account%20Credit%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E1-Credit%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E1-hold%26nbsp%3B%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E1-Debit%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM%20-%20Account%20Transfer%20(contl)%3C%2FTD%3E%0A%3CTD%20width%3D%22161%22%3E2-transfer%20or%202-%20rejected%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3ECM%20-%20Account%20Closed%20(util)%3C%2FTD%3E%0A%3CTD%3EClosed%2C%20Dormant%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%26nbsp%3BCM-%20Account%20Credit%20(contl)%20and%26nbsp%3BCM%20-%20Account%20Transfer%20(contl)-%20notes%20should%20be%20number-Notes%20without%20spaces.%3C%2FP%3E%0A%3CP%3ECM%20-%20Account%20Closed%20(util)-%20Notes%20should%20be%20without%20number(Closed%20or%20Dormant)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426612%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426612%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%20in%20the%20attached%20I%20have%205%20'helper'%20columns%20of%20which%203%20are%20hidden.%26nbsp%3B%20I%20have%20a%20%23%20col%20and%20a%20comment%20type%20column%20and%20then%20a%20%22Notes%22%20column%20that%20compiles%20the%20%23%20with%20the%20type.%26nbsp%3B%20The%203%20hidden%20columns%20create%20a%20list%20of%20potential%20allowed%20comment%20types%20based%20on%20the%20category.%26nbsp%3B%20I%20added%20conditional%20formatting%20on%20the%20%22Notes%22%20column%20to%20check%20if%20something%20is%20missing%20and%20data%20validation%20on%20the%20%23%20col%20and%20the%20type%20cols.%20%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20can%20all%20get%20merged%20into%20a%20single%20col%20but%20it%20just%20gets%20more%20complicated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426634%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426634%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20it%20works%20for%20me.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1426650%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1426650%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F400991%22%20target%3D%22_blank%22%3E%40resham1985%3C%2FA%3E%26nbsp%3B%2C%20you%20are%20welcome%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Microsoft

We have a range where each categories has notes.

 

Please find the below condition where 1, 2 are the volumes.

CM- Account Credit (contl) category should be 1-Credit or 2-hold or 1-rejected and it has to throw error if the notes are not matching.

 

 Category Notes
CM- Account Credit (contl) 1-Credit or 1-hold or 1-rejected
CM - Account Transfer (contl) 2-transfer or 2- rejected
CM - Account Closed (util) Closed, Dormant
13 Replies
Highlighted

@resham1985  you can use "Data Validation" and choose "custom" and enter a formula like the following assuming B is category and C is note and you start validation in row 2:

=OR(AND(B2="category 1",OR(C2="comment 1",C2="comment 2",C2="comment 3")), AND(B2="category 2",OR(C2="comment 4",C2="comment 5")), AND(B2="category 3",OR(C2="comment 6",C2="comment 7")))

 

hopefully you can substitute the proper text in each case you want.

Highlighted
Thank you @mtarler for the response.

But the problem is notes or comments will not be same as it changes as per the volume

Notes for CM- Account Credit (contl) will be
volume processed-Credit
volume processed-rejected
volume processed-hold

Formula should be number-notes

Highlighted

@resham1985 

Please attach your sample file with data and desired results therein.

Highlighted

@resham1985 

You can use LOOKUP function and make this dynamic array.

LOOKUP(field to search, first column where search is being done, what to return when search is matched).

Try this and confirm if this is feasible solution.

Highlighted

@ShishirKumar 

 

Please find the attached sample file and help him to get the desired result.

 

Column A- Category

Column B- Notes

Column C- Manually I checked whether Category matching with the notes or not 

Column D- Please add the formula to check whether the correct notes selected for correct category

 

Note: CM- Account Credit (contl) and CM - Account Transfer (contl)----Number-Notes( No Spaces)

For Category CM - Account Closed (contl)- notes should be without number ie Closed or Dormant

Highlighted

@resham1985 

Could you please clarify the logic a bit more. For example, in left table

CM- Account Credit (contl) 1- credit Error

having 1-credit for this category in right table, but

CM- Account Credit (contl) 3-credit No Error

has no error. If we ignore numbers, both shall return No Error. If not, it shall be an opposite.

Highlighted

@Sergei Baklan - There is space after hyphen, so it is error.

CM- Account Credit (contl) 1- credit Error
Highlighted

@resham1985  So if I understand correctly the note should have a number followed by "-Credit" or "-rejected" etc...  

I would recommend that you split those into 2 separate columns to make your life easier and the sheet more functional.  If you need a column with that specific format you can "build" it.  For example you have 1 col that is # and another column that is action (e.g. credit vs rejected etc...).  You can have specific controls on each of those columns.  The a 3rd col that would TEXTJOIN those 2 columns with an "-" or in the last case just where there are no numbers just use the later col.

 

That said, if you still want to limit the entry to only that format you can make the validation formula more complicated.  Here is an example where I changed the Data Validation formula above using the search function to make sure at least the non-numbered part is correct:

 

=OR(AND(B2="category 1",OR(search("comment 1",C2),search("comment 2",C2),search("comment 3",C2))), AND(B2="category 2",OR(search("comment 4",C2),search("comment 5",C2))), AND(B2="category 3",OR(search("comment 6",C2),search("comment 7",C2))))

 

 

Highlighted
Best Response confirmed by resham1985 (Microsoft)
Solution

@resham1985 

I'd also recommend to re-design right table a bit as

image.png

with Helper column calculated as

=TRIM(IFERROR(
     RIGHT(
       $H$3:INDEX($H$3:$H$100,COUNTA($H$3:$H$100)),
       LEN($H$3:INDEX($H$3:$H$100,COUNTA($H$3:$H$100))) -
       FIND("-",$H$3:INDEX($H$3:$H$100,COUNTA($H$3:$H$100)))),
 $H$3:INDEX($H$3:$H$100,COUNTA($H$3:$H$100))))

 

Status could be calculated as

image.png

by formula

=IF(COUNTIFS(
    $G$3:INDEX($G$3:$G$100,COUNTA($G$3:$G$100)),
    $A2,
    $I$3:$I$9,
    IFERROR(RIGHT($B2,LEN($B2)-FIND("-",$B2)),$B2)
),"No Error", "Error")
Highlighted

@Twifoo 

 

Please find the attached file for your reference.

 

 Category Notes
CM- Account Credit (contl) 1-Credit
  1-hold 
  1-Debit
   
CM - Account Transfer (contl) 2-transfer or 2- rejected
CM - Account Closed (util) Closed, Dormant

 

For CM- Account Credit (contl) and CM - Account Transfer (contl)- notes should be number-Notes without spaces.

CM - Account Closed (util)- Notes should be without number(Closed or Dormant)

Highlighted

@resham1985  in the attached I have 5 'helper' columns of which 3 are hidden.  I have a # col and a comment type column and then a "Notes" column that compiles the # with the type.  The 3 hidden columns create a list of potential allowed comment types based on the category.  I added conditional formatting on the "Notes" column to check if something is missing and data validation on the # col and the type cols.  

This can all get merged into a single col but it just gets more complicated.

Highlighted

Thank you it works for me.

Highlighted

@resham1985 , you are welcome