SOLVED

HELP WITH VBA OR FORMULA

%3CLINGO-SUB%20id%3D%22lingo-sub-1512710%22%20slang%3D%22en-US%22%3EHELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1512710%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHi%20%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Elet's%20say%20I%20give%20you%20a%20list%20of%20fruits%20(something%20like%20the%20attachment)%20and%20ask%20you%20choose%20the%20one%20you%20like%20from%20each%20list.%20let's%20say%20there%20are%20%22N%22%20items%20in%20the%20list%20and%20you%20only%20like%2010%20of%20them%20the%20most.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Enow%20you%20start%20selecting%20or%20marking%20or%20checking%20the%20one%20you%20like.%20every%20time%20you%20select%20your%20choice%20will%20enter%20or%20type%20in%20another%20cell.%20or%20even%20you%20can%20select%20all%20in%20one%20time%20maybe%20through%20VBA%20you%20create%20a%20%22run%22%20button.%20by%20clicking%20the%20%22run%22%20all%20your%20choices%20will%20be%20enter%20to%20a%20new%20cell%20one%20on%20one.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eso%20at%20the%20end%20i%20would%20have%20a%20column%20selection%20of%20your%2010%20choices%20of%2050.%20hope%20the%20problem%20is%20clear.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ethanks%26nbsp%3B%3C%2FSPAN%3Ea%20lot%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1512710%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETraining%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1512894%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1512894%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20First%20off%2C%20please%20don't%20create%20new%20duplicate%20threads.%3C%2FP%3E%3CP%3EAs%20for%20VBA%2C%20of%20course%20VBA%20can%20do%20anything%20you%20can%20do%20in%20the%20sheet%20and%20more%2C%20but%20unless%20the%20VBA%20code%20is%20really%20small%20or%20trivial%2C%20the%20us%20volunteers%20here%20probably%20won't%20create%20it%20for%20you.%26nbsp%3B%20But%20in%20VBA%20you%20can%20create%20custom%20forms%20for%20data%20entry%20(I%20believe%20a%20PC%20version%20it%20is%20still%20required%20to%20create%20or%20edit%20the%20form%20but%20that%20they%20will%20work%20on%20a%20Mac%2C%20but%20they%20don't%20work%20if%20using%20Excel%20online).%26nbsp%3B%20You%20can%20also%20create%20active%20modules%20that%20will%20monitor%20sheet%20edits%20and%20make%20updates%20accordingly.%3C%2FP%3E%3CP%3EThat%20said%2C%20I%20often%20try%20to%20achieve%20the%20functionality%20in%20the%20sheet%20to%20avoid%20problems%20with%20others%20being%20required%20to%20approve%20the%20macro%20functions%20before%20the%20sheet%20will%20work%20(and%20in%20some%20cases%20they%20can't).%3C%2FP%3E%3CP%3EMy%20prior%20answer%20using%20drop%20down%20menus%20could%20be%20modified%20so%20each%20successive%20drop%20down%20list%20would%20exclude%20items%20already%20selected.%3C%2FP%3E%3CP%3EAnother%20alternative%20is%20to%20add%20another%20column%20next%20to%20the%20list%20and%20just%20have%20the%20user%20type%20an%20%22x%22%20in%20that%20column%20instead%20of%20'checkboxes'%20or%20maybe%20rank%20their%20favorite%20foods%20in%20that%20column%20(then%20you%20could%20even%20sort%20by%20that%20rank).%3C%2FP%3E%3CP%3EIf%20you%20want%20checkboxes%2C%20they%20point%20to%20a%20cell%20so%20if%20you%20create%20that%20column%20next%20to%20the%20list%20and%20add%20checkboxes%20over%20each%20cell%20you%20can%20have%20each%20checkbox%20'point'%20to%20that%20corresponding%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20if%20you%20take%20the%20suggestion%20of%20adding%20a%20column%20that%20they%20rank%20their%20favorites%20then%20you%20could%20use%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIFERROR(INDEX(A%3AA%2CMATCH(ROW()-ROW(%24C%241)%2CB%3AB%2C0))%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%20assuming%20the%20food%20is%20in%20col%20A%2C%20the%20ranking%20is%20in%20col%20B%2C%20and%20this%20list%20is%20created%20in%20col%20C%20with%20C1%20being%20a%20header%20line.%3C%2FP%3E%3CP%3EVarious%20tweaks%20could%20be%20made%20to%20account%20for%20non-sequential%20and%20duplicate%20ranking%20and%20such%20if%20needed.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514305%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514305%22%20slang%3D%22en-US%22%3EThank%20you%20Very%20much%20and%20a%20lot%20appreciate%20your%20effort%20to%20give%20me%20all%20the%20different%20possible%20options.%20Also%20thank%20you%20for%20informing%20I%20should%20not%20create%20duplicate%20threads.%20I%20thought%20the%20second%20problem%20description%20was%20more%20clear%20and%20understandable.%20So%20I%20might%20get%20better%20responses.%20I%20do%20prefer%20a%20solution%20with%20checkbox%20because%20make%20it%20much%20user%20friendly.%20Can%20you%20please%20guide%20me%20through%20that%20option%3F%3CBR%20%2F%3EI%20am%20working%20on%20a%20project%20and%20it%20looks%20like%20you%20are%20an%20expert.%20Not%20sure%20how%20can%20be%20in%20touch.%20but%20let%20me%20know%20if%20you%20are%20available.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1514663%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1514663%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20I%20am%20not%20an%20expert%2C%20when%20we%20talk%20about%20checkboxes.%26nbsp%3B%20I've%20used%20them%2C%20but%20not%20too%20fond%20of%20them%20for%20various%20reasons%2C%20some%20of%20which%20may%20just%20be%20me%20not%20knowing%2Flearning%20advanced%20use%20options%20for%20them.%26nbsp%3B%20One%20of%20the%20main%20issues%20I%20have%20with%20them%20is%20the%20manual%20overhead%20to%20create%20and%20configure%20each%20of%20them.%26nbsp%3B%20So%20I%20have%20attached%20a%20sample%20document%20that%20I%20think%20is%20what%20you%20are%20looking%20for%20and%20as%20you%20take%20it%20and%20expand%20it%20you%20can%20see%2Fdecide%20for%20yourself%20(unless%20someone%20else%20here%20might%20know%20and%20chime%20in%20with%20some%20tricks%20to%20make%20it%20easier).%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20attached%20I%20copied%20the%20lists%20you%20showed%20in%20your%20attached%20image%20(spelling%20errors%20corrected)%20into%20columns%20B%2C%20D%2C%20F%20and%20columns%20A%2C%20C%2C%20E%20are%20used%20to%20give%20spacing%20between%20the%20lists%20so%20the%20checkboxes%20can%20sit%20to%20left%20of%20each%20corresponding%20item.%26nbsp%3B%20The%20checkboxes%20are%20then%20configured%20to%20control%20the%20corresponding%20cell%20it%20is%20sitting%20over%20top.%26nbsp%3B%20The%203%20%22Selection%22%20lists%20are%20then%20in%20columns%20H%2C%20J%2C%20and%20K%20also%20skipping%20a%20column%20between%20each.%26nbsp%3B%20This%20space%20is%20nice%20in%20appearance%20but%20more%20importantly%20makes%20copying%20the%20formula%20easier.%26nbsp%3B%20So%20try%20it%20out%20and%20see%20and%20if%20you%20like%20you%20can%20follow%20the%20following%20instructions%20to%20expand%3A%3C%2FP%3E%3CP%3E1.%20fill%20in%20the%20rest%20of%20you%20lists%3C%2FP%3E%3CP%3E2.%20%22copy%22%20or%20%22add%22%20additional%20checkboxes%20(tip%3A%20if%20you%20shift%20-%20right%20click%20multiple%20checkboxes%20you%20can%20then%20ctrl-drag%20them%20to%20copy%20many%20at%20a%20time)%3C%2FP%3E%3CP%3E3.%20configure%20each%20new%20checkbox%20to%20%22control%22%20the%20cell%20it%20is%20sitting%20on%20top%20of.%26nbsp%3B%20Ctrl-Right%20click%20box%20and%20select%20%22Format%20Control%22%20then%20on%20the%20%22Control%22%20tab%20type%20the%20cell%20reference%20into%20the%20Cell%20Link%20field.%20(note%20you%20can%20click%20on%20the%20cell%20but%20I%20find%20that%20harder%20since%20the%20checkbox%20is%20blocking%20it%20and%20I'm%20faster%20with%20my%20keyboard)%3C%2FP%3E%3CP%3E4.%20The%20formulas%20under%20the%20%22Selected%22%20list%20are%20copied%20from%20row%202%20to%206%20(i.e.%20max%20of%205%20items).%20If%20more%20are%20needed%20you%20can%20copy%20the%20formula%20down%20to%20additional%20rows.%26nbsp%3B%20%3CU%3EBonus%3C%2FU%3E%3A%20I%20added%20conditional%20formatting%20to%20highlight%20a%20%22Selected%22%20column%20if%20it%20appears%20more%20items%20are%20are%20selected%20than%20can%20be%20shown%20in%20the%20%22Selected%22%20list.%20You%20can%20test%20this%20by%20selecting%20all%206%20items%20in%20the%20first%20list.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1516444%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1516444%22%20slang%3D%22en-US%22%3EI%20really%20appreciate%20taking%20your%20time%20and%20providing%20the%20best%20and%20most%20complete%20answer.%20This%20was%20exactly%20what%20I%20was%20looking%20for.%20I%20really%20like%20the%20date%20validation%20Idea%20you%20added%20to%20it.%3CBR%20%2F%3EThanks%20alot%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1520167%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1520167%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20solution%20for%20multi%20checkbox%20list%3F%26nbsp%3B%3C%2FP%3E%3CP%3EI%20Have%20over%2050%20checkboxes%20in%20one%20column%20and%20another%20over%2050%20checkboxes%20in%20the%20other%20column%2C%20and%20so%20on.%20In%20total%2C%20I%20have%20over%2010%20columns%20that%20each%20need%20over%2050%20checkboxes.%20Do%20I%20Have%20to%20link%20over%20500%20checkboxes%20one%20by%20one%3F%20or%20is%20there%20any%20way%20to%20make%20it%20faster%3F%3C%2FP%3E%3CP%3EI%20search%20and%20found%20some%20VBA%20codes%20but%20they%20mostly%20are%20for%20multi%20checkboxes%20in%20one%20column.%20like%20this%20one%3A%3C%2FP%3E%3CP%3Ebut%20it%20is%20not%20what%20I%20need.%20Any%20thoughts%20or%20tricks%20you%20know%3F%3C%2FP%3E%3CDIV%20class%3D%22line%20number1%20index0%20alt2%22%3ESub%20LinkChecks()%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number3%20index2%20alt2%22%3Ei%20%3D%202%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number4%20index3%20alt1%22%3EFor%20Each%20cb%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3EIn%20ActiveSheet.CheckBoxes%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number5%20index4%20alt2%22%3Ecb.LinkedCell%20%3D%20Cells(i%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%22B%22).Address%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number6%20index5%20alt1%22%3Ei%20%3D%20i%20%2B%201%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number7%20index6%20alt2%22%3ENext%20cb%3C%2FDIV%3E%3CDIV%20class%3D%22line%20number8%20index7%20alt1%22%3EEnd%20Sub%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1520190%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1520190%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20Hi%20there%20again.%26nbsp%3B%20I%20did%20say%20%22%3CSPAN%3EOne%20of%20the%20main%20issues%20I%20have%20with%20them%20is%20the%20manual%20overhead%20to%20create%20and%20configure%20each%20of%20them.%22%26nbsp%3B%20I%20also%20tried%20to%20steer%20you%20to%20other%20options%20using%20drop%20down%20or%20simple%20%22X%22%20or%20numbers%20in%20adjacent%20cells.%26nbsp%3B%20I'm%20not%20trying%20to%20be%20petty%2C%20just%20apologetic%20that%20I'm%20not%20much%20more%20help%20to%20your%20current%20situation.%26nbsp%3B%20IF%20you%20created%20them%20in%20an%20orderly%20fashion%20you%20can%20create%20a%20macro%20similar%20to%20the%20one%20you%20found%20to%20assign%20the%20cells%20but%20if%20you%20are%20getting%20into%20writing%20a%20macro%20you%20can%20write%20one%20that%20monitors%20the%20page%20and%20on%20cell%20activation%20(i.e.%20click)%20toggle%20the%20background%20color%20and%20add%2Fremove%20that%20value%20from%20the%20corresponding%20list.%26nbsp%3B%20I%20don't%20think%20it%20would%20be%20too%20hard%2C%20but%20it%20is%20VBA%20code.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1520196%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1520196%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20response.%3CBR%20%2F%3EI%20did%20not%20quite%20catch%20when%20you%20mentioned%20it.%20When%20I%20get%20to%20the%20action%20I%20realized%20Holy%20moly.%20It%20takes%20me%20forever.%20the%20problem%20is%20I%20do%20know%20nothing%20about%20VBA.%3CBR%20%2F%3Ethanks%20any%20way.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1520288%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1520288%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20I%20wrote%20a%20very%20simple%20VBA%20that%20will%20watch%20if%20you%20click%20on%20any%20cell%20in%20the%20range%20A2%3AF10%20(you%20can%20tweak%20it)%20and%20if%20so%20it%20will%20toggle%20the%20cell%20to%20the%20left%20of%20an%20entry%20between%20blank%20and%20%221%22%20(you%20can%20change%20that%20to%20%22X%22%20but%20I%20used%20%221%22%20in%20this%20example%20to%20toggle%20the%20checkboxes%20that%20already%20existed%20in%20your%20example).%26nbsp%3B%20To%20see%20how%20it%20works%20and%20tweak%20it%20hit%20Alt-F11%20and%20click%20on%20Sheet1%20under%20VBAProject%20(Fruit%20Seletion.xlsb)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1534258%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1534258%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20struggling%20with%20a%20problem.%20I%20thought%20you%20should%20have%20some%20solution%20for%20it.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attached%20a%20new%20file%20excel%20so%20I%20can%20explain%20the%20problem%20better.%20So%20as%20you%20remember%2C%20you%20gave%20me%20a%20solution%20for%20fruit%20selection.%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20as%20you%20see%20in%20a%20new%20file%20that%20I%20sent%20you%2C%20each%20fruit%20has%20their%20nutrition%20facts.%20I%20am%20trying%20to%20find%20a%20solution%20that%20Let's%20say%2C%20when%20you%20select%20%22green%20apple%22%20not%20only%20transfer%20the%20green%20apple%20to%20%22selection%22%20column%2C%20but%20also%20transfer%20information%20in%20cells%20C2%2C%20D2%2C%20E2%20and%20G2%20(not%20f2)%20next%20to%20it.%26nbsp%3B%3C%2FP%3E%3CP%3Eany%20thought%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(Sry%2C%20since%20I%20created%20the%20file%20in%20One%20drive%20I%20do%20not%20have%20developer%20tab%20to%20create%20the%20checkbox%20the%20way%20you%20thought%20me)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1534423%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1534423%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20I'm%20confused%20because%20I%20thought%20in%20another%20thread%20you%20had%20already%20created%20a%20sheet%20with%20all%20the%20checkboxes.%26nbsp%3B%20but%20in%20this%20sheet%20you%20have%20none%20so%20I%20assume%20you%20will%20use%20an%20%22x%22%20to%20indicate%20selection.%26nbsp%3B%20The%20easiest%20way%20is%20to%20use%20the%20array%20formula%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DFILTER(B%3AG%2C%20A%3AA%3D%22x%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ein%20cell%20k2%20and%20then%20just%20hide%20column%20O%20since%20you%20don't%20want%20to%20see%20col.%20F%3C%2FP%3E%3CP%3Eyou%20could%20replace%20A%3AA%3D%22x%22%20with%20A%3AA%26lt%3B%26gt%3B%22%22%20to%20let%20anything%20be%20the%20selector%3C%2FP%3E%3CP%3Eyou%20could%20replace%20B%3AG%20with%20B%3AE%20and%20then%20add%20the%20same%20formula%20for%20G%3AG%20in%20Column%20O%20if%20you%20really%20don't%20want%20to%20just%20hide%20column%20O.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1534664%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1534664%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20efforts%20and%20Sorry%20for%20any%20misunderstanding.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20trying%20to%20filter%20anything.%20yes%2C%20you're%20right%20we%20created%20all%20the%20checkbox%20lists%20in%20the%20previous%20thread.%20I%20attached%20more%20clear%20excel%20file.%20Let%20me%20ask%20my%20question%20one%20more%20time%2C%20hopefully%2C%20you%20can%20understand%20me%20better%20this%20time.%26nbsp%3B%3C%2FP%3E%3CP%3E1-%20I%20am%20looking%20for%20a%20formula%2C%20that%20when%20I%20select%20%22Orange%22%2C%20all%20the%20information%20next%20to%20orange%20will%20transfer%20to%20selection%201%20(as%20you%20see%20in%20the%20example%2C%20but%20I%20copied%20and%20pasted%20it)%26nbsp%3B%3C%2FP%3E%3CP%3E2-%20The%20second%20question%20is%2C%20what%20if%20when%20I%20select%20%22orange%22%20just%20%22SERVINGS%22%2C%20%22UNIT%22%20AND%20%22PROTEIN%22%20amount%20be%20transferred.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%20I%20appreciate%20it%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1534703%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1534703%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20No%2C%20my%20apologies%2C%20I%20should%20have%20included%20my%20sample%20sheet.%26nbsp%3B%20FILTER()%20is%20just%20a%20function%20that%20'grabs'%20a%20set%20of%20'filtered'%20data.%26nbsp%3B%20So%20in%20this%20case%20I%20was%20telling%20it%20to%20get%20all%20the%20items%20in%20your%20original%20table%20(B%3AG)%20and%20display%20only%20those%20that%20pass%20the%20criteria%20(i.e.%20where%20checked%20off).%26nbsp%3B%20I%20have%20updated%20the%20checkbox%20sheet%20you%20sent%20with%20both%20methods%3A%26nbsp%3B%20the%20previous%20method%20expanded%20to%20include%20the%20additional%20columns%20and%20this%20new%20FILTER()%20method.%3C%2FP%3E%3CP%3EIf%20you%20are%20wondering%20the%20%2B%2F-%20of%20each%20method%20I%20would%20say%20a%20couple%20basic%20things%20are%3A%3C%2FP%3E%3CP%3Ea)%20the%20'original'%20method%20is%20compatible%20with%20older%20versions%20of%20excel%20if%20someone%20happens%20to%20have%20an%20old%20version%3C%2FP%3E%3CP%3Eb)%20the%20'new'%20method%20is%20self%20expanding%20so%20if%20the%20list%20get%20bigger%2C%20it%20automatically%20expands%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1546191%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1546191%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot.%20I%20did%20run%20and%20it%20works%20perfectly.%20but%20I%20am%20facing%20another%20problem%20now.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Efor%20example%2C%20when%20you%20choose%20%22apple%22%20and%20%22orange%22%20**bleep**%20either%20one%20through%20Rand()%20(column%20helper)%20and%20enter%20into%20%22selection%22.%20the%20result%20will%20be%20orange%20or%20apple%20every%20time%20you%20run%20it.%20I%20tried%20this%20formula%3C%2FP%3E%3CP%3E%3DINDEX(FILTER(B2%3AG7%2C%24A%242%3A%24A%247)%2CRANK(%24H%242%2C%24H%242%3A%24H%247)%2C1)%3C%2FP%3E%3CP%3Eand%20it%20works%20but%20the%20problem%20I%20will%20get%20an%20error%20sometimes%20because%20the%20number%20of%20%22helper%22%20is%20more%20than%20the%20selected%20fruits.%26nbsp%3B%3C%2FP%3E%3CP%3Eis%20there%20any%20modification%20I%20should%20add%20to%20fix%20the%20problem%3F%3C%2FP%3E%3CP%3EIn%20other%20words%2C%20when%20I%20select%20one%20fruit%2C%20give%20me%20only%201%20rand()%2C%20two%20give%20me%202%20rand().%26nbsp%3B%20but%20the%20issue%20is%20coming%20from%20that%20we%20do%20not%20know%20how%20many%20fruits%20will%20be%20selected%20so%20we%20will%20be%20able%20to%20assign%20each%20selection%20to%20each%20helper.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20you%20understood%20what%20I%20am%20trying%20to%20do.%20I%20attached%20the%20file%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1546968%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1546968%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20i'm%20sorry%20but%20I%20don't%20understand.%26nbsp%3B%20I%20don't%20understand%20what%20the%20RND()%20helper%20column%20is%20supposed%20to%20do%20and%20the%20attached%20sheet%20uses%20the%20older%20formula%20and%20seems%20to%20work%20fine.%26nbsp%3B%20But%20then%20again%20I%20don't%20think%20I%20understand%20something%20you%20are%20trying%20to%20do.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1550112%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1550112%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20bad.%20you%20are%20right.%20I%20will%20try%20again.%26nbsp%3Blet%20me%20I%20start%20off%20with%20Rand()%20and%20%22helper%20column%22%20confusion.%20The%20reason%20I%20created%20the%20helper%20column%20formulated%20by%20Rand()%20is%20because%20it%20gives%20me%20the%20ability%20to%20pick%20random%20from%20the%20final%20selection%20list%20and%20also%20the%20helper%20column%20which%20is%20rand().%20For%20example%20if%20you%20select%20%22orange%22%20%22apple%22%20and%20%22banana%22%20from%20the%20list%20with%20your%20formula%20it%20will%20return%20only%20these%203%20options.%20The%20next%20step%20is%20picking%20a%20random%20fruit%20from%20the%20user%20selection.%26nbsp%3BI%20have%20two%20huge%20problems%20here%20which%20cause%20so%20much%20time%20and%20basically%20turn%20all%20my%20effort%20useless.%20because%20I%20have%20to%20do%20lots%20of%20manual%20adjustment.%20Let%20me%20explain%20to%20you.%26nbsp%3Bstep%201%3A%20select%20fruits%20from%20the%20main%20list%20through%20checkbox%20list.%20Next%20the%20info%20for%20each%20fruit%20will%20be%20transferred%26nbsp%3Bto%20the%20cells%20we%20have%20selected.%26nbsp%3Bstep%202%3A%20Now%20I%20have%20to%20create%20another%26nbsp%3Bfunction%26nbsp%3Bto%20pick%20a%20random%20fruit%20and%20transfer%26nbsp%3Bit%20to%20another%20cell.%20Here%20is%20exactly%20the%20point%20that%20lack%20of%20efficiency%20starts%20kicking%20in.%26nbsp%3B%20In%20order%20to%20do%20that%2C%20I%20need%20to%20write%20Rand()%20in%20a%20cell%20and%20drag%26nbsp%3Bit%20down%20to%20the%20number%20of%20fruits%20that%20have%20been%20selected.%20for%20example%20every%20time%20user%20select%204%20fruits%20I%20have%20to%20create%20a%20column%26nbsp%3Bwith%204%20rows%20with%20rand()%2C%20if%20the%20select%201%20will%20be%20one%20row%20and%20...%20the%20formula%20I%20use%20for%20this%20%3DINDEX(FILTER(B2%3AG7%2C%24A%242%3A%24A%247)%2CRANK(%24H%242%2C%24H%242%3A%24H%247)%2C1)%26nbsp%3BImagine%20every%20time%26nbsp%3BI%20have%20to%20change%20the%20Rank%20based%20on%20the%20number%20of%20selections.%20If%20it%20is%205%20fruits%20to%20get%20either%20one%20I%20have%20to%20adjust%20the%20rank%20from%26nbsp%3BRANK(%24H%242%2C%24H%242%3A%24H%247)%20to%26nbsp%3BRANK(%24H%242%2C%24H%242%3A%24H%245)%20.%26nbsp%3Bstep%203%3A%20I%20am%20going%20to%20assign%20these%20selections%20of%20fruits%20between%207%20days%20a%20week%2C%20so%20the%20user%20can%20eat%20those%20days%20as%20a%20choice%20of%20their%20favorite%20fruits.%20In%20order%20to%20do%20that%2C%20let's%20say%20X1%20to%20x7%20will%20be%20day%201%20to%20day%207.%20so%20I%20need%20to%20enter%20the%20function%20manually%20for%20each%20cell%20x1%20to%20x7%20because%20let's%20say%20if%20you%20just%20enter%20the%20formula%20in%20X1%20and%20you%20want%20to%20drag%20it%20all%20the%20way%20to%20x7%2C%20unfortunately%20it%20won't%20work%20then%20I%20will%20type%20it%20for%20each%20cell%20separately.Honestly%20I%20am%20so%20disappointed%20that%20I%20am%20not%20sure%20Excel%20is%20the%20right%20platform%20for%20what%20I%20am%20trying%20to%20do.%26nbsp%3BI%20am%20looking%20for%20a%20more%20efficient%20and%20automated%20answer%20that%20ideally%20when%20I%20select%20fruits%20from%20selection%2C%20randomize%20it%20and%20transfer%20it%20straight%20to%20the%20x1%20to%20x7%20cells.%20I%20waste%20so%20much%20time%20that%20it%20makes%20more%20sense%20to%20just%20handle%20it%20manually.%20so%20frustrating.%26nbsp%3BPlease%20let%20me%20know%20what%20you%20think.I%20hope%20I%20explained%20it%20more%20clearly%20this%26nbsp%3Btime.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1552083%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1552083%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20I'm%20sorry%20you%20are%20having%20so%20much%20trouble.%26nbsp%3B%20I%20am%20still%20not%20sure%20I%20understand%20all%20that%20you%20are%20trying%20to%20do%20but%201%20tip%20I%20think%20may%20help%20is%20that%20instead%20of%20using%20x%20number%20of%20RAND()%20and%20then%20finding%20the%20RANK()%20a%20more%20common%20way%20is%20to%20use%20N*RAND()%20to%20scale%20the%20RAND%20over%20the%20range%20you%20are%20interested%20or%20more%20specifically%20for%20your%20case%20something%20like%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DROUNDUP(COUNT(%24J%3A%24J)*RAND()%2C0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ethen%20to%20select%20that%20RAND%20selection%20from%20Selection%201%20table%20I%20would%20use%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DOFFSET(%24I%241%3A%24N%241%2CROUNDUP(COUNT(%24J%3A%24J)*RAND()%2C0)%2C0)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EWith%20these%20new%20dynamic%20arrays%20you%20only%20need%20to%20enter%20this%20formula%20in%20cell%20P6%20and%20it%20will%20automatically%20%22spill%22%20over%20into%20columns%20Q%3AU%3C%2FP%3E%3CP%3EI'm%20not%20understanding%20the%20requirements%20for%20the%207%20days.%26nbsp%3B%20If%20it%20is%20the%20%22same%22%20that%20you%20want%20a%20random%20selection%20you%20can%20use%20the%20same%20formula%20for%20each%20day.%26nbsp%3B%20If%20you%20need%20to%20'remove'%20previously%20selected%20fruit%20(i.e.%20so%20you%20don't%20each%20a%20banana%20all%207%20days)%20it%20gets%20a%20bit%20more%20complicated%20because%20then%20what%20if%20you%20have%20%26lt%3B7%20selected%20fruits%20and%20such.%26nbsp%3B%20I%20hope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%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-1575220%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1575220%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20again%2C%20sorry%20for%20getting%20back%20to%20you%20late.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20working%20on%20it%20and%20now%20it%20is%20working%20the%20way%20it%20was%20supposed%20to%20work.%20I%20used%20the%20Offset%20function%20with%20a%20few%20tweaks.%26nbsp%3B%20how%20can%20I%20apply%20OFFSET%20with%20Countif%20while%20getting%20randoms%20to%20avoid%20duplicates%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20multi-columns%20and%20each%20column%20has%20a%20different%20number%20of%20rows.%20the%20date%20is%20in%20text%20formats.%20I%20am%20getting%20the%20answers%20but%20sometimes%20generate%20duplicates.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elet's%20say%20I%20have%20in%20A1%3A10%20the%20following%3A%3C%2FP%3E%3CP%3Ebbb%3C%2FP%3E%3CP%3Eccc%3C%2FP%3E%3CP%3Eddd%3C%2FP%3E%3CP%3Eeee%3C%2FP%3E%3CP%3Efff%3C%2FP%3E%3CP%3Eaaa%3C%2FP%3E%3CP%3Ebbb%3C%2FP%3E%3CP%3Eccc%3C%2FP%3E%3CP%3Errr%3C%2FP%3E%3CP%3Ettt%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20in%20B1%3BB8%3C%2FP%3E%3CP%3Ejjj%3C%2FP%3E%3CP%3Eiii%3C%2FP%3E%3CP%3Eaaa%3C%2FP%3E%3CP%3Ebbb%3C%2FP%3E%3CP%3Eccc%3C%2FP%3E%3CP%3Eddd%3C%2FP%3E%3CP%3Eaaa%3C%2FP%3E%3CP%3Ejjj%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehow%20should%20I%20use%20the%20OFFSET%20function%20that%20not%20only%20gives%20me%20a%20random%20but%20also%20avoids%20any%20duplicates%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20this%20but%20it%20is%20not%20working%3C%2FP%3E%3CP%3E%3DCOUNTIFS(OFFSET(%24A%241%2CCOUNTA(A1%3AA10)*RAND()%2C0)%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elooking%20for%20a%20solution%20except%20for%20data%20validation%20or%20helper%20column%20to%20generate%20random.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1575355%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1575355%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20again%2C%20I'm%20not%20sure%20exactly%20how%20this%20fits%20in%2C%20but%20it%20sounds%20like%20you%20want%20to%20take%20a%20column%20and%20randomly%20order%20the%20unique%20values.%26nbsp%3B%20Here%20is%20a%20formula%20to%20do%20that%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSORTBY(UNIQUE(%24A%242%3A%24A%2411)%2CRANDARRAY(COUNTA(UNIQUE(%24A%242%3A%24A%2411))%2C1%2C%2C%2C))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThis%20is%20a%20dynamic%20array%20and%20will%20automatically%20spill%20down%20the%20needed%20rows.%26nbsp%3B%20Hope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1576420%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1576420%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EI%20tried%20it%20but%20it%20looks%20like%20give%20me%20the%20same%20result%20as%26nbsp%3B%3DINDEX(A2%3AA11%2C%20RAND())%20correct%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20express%20my%20problems%20one%20more%20time%20in%20a%20better%20way.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20get%20random%20data%20from%20A1%3A%20A11%20in%20different%20cells.%20let's%20say%20D1%2C%20D4%2C%20and%20D5.%20but%20with%20no%20repetition.%20if%20you%20help%20me%20with%20function%20structure%20I%20will%20figure%20out%20the%20rest%20to%20modify%20the%20formula.%26nbsp%3B%3C%2FP%3E%3CP%3EData%20are%20in%20text%20format%20and%20more%20than%20one%20word.%20I%20tried%20to%20get%20help%20from%20REMOVE%20DUPLICATE%20in%20data%20tab%2C%20it%20works%20but%20still%2C%20show%20me%20duplicates.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20used%20this%26nbsp%3B%3DOFFSET(%24A%242%2CCOUNTA(A3%3AAX11)*RAND()%2C0)%3C%2FP%3E%3CP%3Eit%20is%20working%20perfectly%20the%20only%20problem%20is%20when%20I%20drag%20down%20the%20cell%20to%20copy%20the%20formula%20in%20the%20number%20of%20the%20rows%20that%20I%20want%2C%20sometimes%20you%20will%20see%20repetition.%20If%20you%20have%20any%20idea%20hoe%20adjust%20this%20formula%20to%20avoid%20duplicates%20that%20will%20the%20best%20answer%20to%20my%20question.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20I%20could%20explain%20better%20this%20time.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1579588%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1579588%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20Hi.%26nbsp%3B%20I've%20been%20toying%20with%20this%20latest%20request%2Fcomment%20and%20have%20been%20struggling%20with%20it.%26nbsp%3B%20First%20let%20me%20clarify%20what%20you%20want.%26nbsp%3B%3C%2FP%3E%3CP%3ELet's%20say%20you%20have%20the%20letters%20a-z%20in%20column%20A%3C%2FP%3E%3CP%3Ethen%20in%20column%20C%20you%20want%20a%20formula%20that%20will%20return%20a%20%3CU%3Erandom%3C%2FU%3E%20selection%20from%20column%20A%20and%20that%20formula%20can%20return%20multiple%20UNIQUE%20random%20items%20so%20that%20no%202%20items%20in%20column%20C%20are%20the%20same%20(e.g.%20'm'%2C%20'g'%2C%20't'%2C%20'b')%3C%2FP%3E%3CP%3Ethen%20in%20column%20E%20you%20want%20to%20do%20the%20same%20and%20have%20unique%20random%20items%20from%20column%20A.%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20question%20is%20if%20this%20column%20E%20must%20also%20be%20unique%20from%20column%20C%20so%20'n'%2C%20'c'%2C%20'r'%20would%20be%20ok%20but%20't'%2C%20...%20would%20not%20because%20't'%20was%20already%20selected%20in%20column%20C.%3C%2FP%3E%3CP%3EAlso%20what%20happens%20if%20or%20when%20you%20don't%20have%20enough%20unique%20items%20left%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20the%20formula%20I%20gave%20before%20with%20an%20added%20index%20will%20give%20you%20a%20random%20selection%20of%20unique%20values%20from%20column%20A%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDEX(SORTBY(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1))%2CRANDARRAY(COUNTA(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1)))%2C1%2C%2C%2C))%2CSEQUENCE(5))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ewhere%20the%20range%20in%20this%20formula%20is%20%24A%241%3A%24A%2419%20and%20in%20this%20case%20it%20will%20only%20return%20the%20first%205%20items%20it%20finds%20(see%20the%20'5'%20in%20the%20SEQUENCE()%20function)%3C%2FP%3E%3CP%3EThis%20is%20DIFFERENT%20than%20your%20COUNTIF%20formula%20because%20no%202%20cells%20in%20this%20response%20will%20be%20duplicates%20but%20using%20that%20COUNTIF%20and%20copying%20it%20down%20depending%20on%20the%20RAND()%20number%20generated%20there%20is%20a%20chance%20for%20a%20duplicate.%3C%2FP%3E%3CP%3ENow%20as%20for%20ANOTHER%20column%20that%20also%20pulls%20random%20items%20from%20A%3B%20if%20that%20has%20to%20also%20be%20UNIQUE%20from%20the%20previous%20selection%20of%20random%20pick%2C%20I'm%20at%20a%20loss.%26nbsp%3B%20I%20could%20do%20it%20using%20VBA%20and%20probably%20using%20a%20helper%20column%2C%20but%20your%20request%20to%20do%20it%20without%2C%20I%20couldn't%20figure%20out%20a%20way.%26nbsp%3B%20Feel%20free%20to%20post%20this%20NEW%20problem%20as%20a%20new%20topic%20and%20see%20if%20anyone%20else%20can%20help.%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20said%2C%20if%20I%20can%20convince%20you%20to%20just%20use%20a%20helper%20column%20(and%20just%20hide%20the%20column)%20then%20use%20the%20formula%20I%20gave%20in%20my%20previous%20response%20(without%20the%20INDEX%20portion)%20to%20create%20a%20UNIQUE%20random%20list%20from%20the%20original%20and%20then%20just%20look%20up%20a%20selection%20from%20each%20of%20the%20other%20columns.%26nbsp%3B%20First%20column%20could%20be%20direct%20references%20and%20then%20the%20second%20column%20can%20count%20how%20many%20are%20in%20the%20first%20column%20and%20OFFSET%20by%20that%20number%20plus%20its%20own%20row%20number%20...%26nbsp%3B%20That%20is%20very%20possible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1579633%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1579633%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20taking%20your%20time%20and%20sorry%20if%20I%20gave%20you%20a%20hard%20time.%20I%20do%20not%20min%20if%20you%20cursed%20me%20a%20lot.%20lol%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWell%2C%20I%20just%20used%20the%20formula%20and%20it%20is%20working%20but%20there%20is%20one%20problem.%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20let%20me%20first%20point%20to%20where%20I%20possibly%20did%20not%20explain%20it%20well.%20you%20are%20right%20about%20your%20example%20regarding%20column%20A%20and%20getting%20random%20in%20Column%20C.%26nbsp%3B%3C%2FP%3E%3CP%3EThat%20is%20all%20I%20need.%20i%20am%20not%20going%20to%20take%20random%20from%20C%20and%20run%20it%20in%20E.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20column%20A%20TO%20Z%20.%20but%20I%20need%20random%20data%20from%20each%20column%20with%20no%20duplication%20into%20different%20cells.%3C%2FP%3E%3CP%3Eyour%20formula%20give%20me%205%20rows%20since%20we%20put%20Sequence%205.%20I%20tried%201%20and%20copy%20it%20in%20different%20cells%20and%20I%20see%20the%20duplicate%20again.%3C%2FP%3E%3CP%3EI%20have%20column%20A%20including%20A%20to%20Z%20.%20but%20looking%20for%20a%20formula%20when%20i%20copy%20and%20paste%20it%20let's%20say%20C1%2C%20C5%2C%20D5%2C%20D8%20AND%20E3%20none%20of%20the%20cells%20show%20me%20the%20same%20data.%20for%20example%20show%20me%20a%2C%20b%2C%20c%2C%20d%2C%20e.%20no%20duplicate.%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20do%20not%20have%20any%20idea%20%2C%20that%20fine.%20i%20appreciate%20a%20lot%20it%20so%20far%20all%20the%20helps%20you%20did.%26nbsp%3B%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-1580046%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1580046%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20Yeah%20it%20still%20sounds%20like%20you%20want%20that%20column%20E%20in%20my%20example%20even%20if%20it%20is%20just%201%20cell%20the%20point%20is%20that%20you%20want%20it%20to%20be%20unique%20from%20the%20cell%20in%20column%20C.%26nbsp%3B%20The%20problem%20is%20that%20when%20you%20copy%20that%20formula%20you%20have%20a%20new%20RAND()%20function%20that%20is%20completely%20independent%20from%20the%20previous%20and%20both%20RAND()%20could%20give%20the%20same%20or%20different%20answers%20so%20sometimes%20you%20can%20get%20the%20same%20output%20and%20sometimes%20you%20don't.%26nbsp%3B%20I%20tried%20to%20a%20bunch%20of%20tricks%20to%20include%20the%20previous%20RAND%20selection%20in%20the%20unique%20formula%20but%20they%20didn't%20work.%26nbsp%3B%20But%20those%20were%20'general'%20solutions%20that%20would%20be%20'flexible'.%26nbsp%3B%20let%20me%20ask%20if%20it%20is%20correct%20to%20make%20the%20following%20'assumptions'%20about%20your%20data%3A%3C%2FP%3E%3CP%3E1)%20the%20original%20set%20of%20data%20doesn't%20have%20duplicates%20(i.e.%20no%20need%20to%20filter%20it)%3C%2FP%3E%3CP%3E2)%20you%20only%20need%20a%20few%20discreet%20selections%3C%2FP%3E%3CP%3EHere%20is%20an%20example%20of%20the%20formula%20I%20came%20up%20with%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DINDEX(%24A%241%3A%24A%2411%2CINDEX(SORT(ROW(%24A%241%3A%24A%2411)*(%24A%241%3A%24A%2411%26lt%3B%26gt%3B%24C%241)*(%24A%241%3A%24A%2411%26lt%3B%26gt%3B%24D%241)%2C%2C-1)%2CRAND()*SUM(--(%24A%241%3A%24A%2411%26lt%3B%26gt%3B%24C%241)*(%24A%241%3A%24A%2411%26lt%3B%26gt%3B%24D%241))))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3Ewhere%20original%20data%20is%26nbsp%3B%24A%241%3A%24A%2411%20then%20the%201st%20random%20selection%20was%20in%20C1%20and%20the%202nd%20was%20in%20D1%20and%20this%20is%20the%203rd%20selection%26nbsp%3B%20%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20attached%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1591035%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1591035%22%20slang%3D%22en-US%22%3EThank%20you%20so%20much%20and%20sorry%20for%20the%20late%20response.%20I%20finally%20had%20to%20use%20the%20helper%20column.%20it%20was%20a%20pain%20in%20the%20butt%20but%20I%20kinda%20make%20it%20happen.%3CBR%20%2F%3EI%20might%20have%20more%20questions%20in%20the%20future%20that%20will%20bother%20you%20soon%20again.%20lol%3CBR%20%2F%3EThanks%20again.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1602060%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602060%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3Ehi%20again%2C%26nbsp%3B%3C%2FP%3E%3CP%3Equick%20question%2C%26nbsp%3B%3C%2FP%3E%3CP%3Eyou%26nbsp%3Bhelped%20this%20formula%20before%20to%20generate%20random%20data%20from%20a%20column%20with%20no%20duplication.%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DINDEX(SORTBY(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1))%2CRANDARRAY(COUNTA(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1)))%2C1%2C%2C%2C))%2CSEQUENCE(5))%3C%2FPRE%3E%3CP%3EI%20modify%20the%20formula%20to%26nbsp%3B%3C%2FP%3E%3CP%3E%3DSORTBY(UNIQUE(AY%243%3AAY%2413)%2CRANDARRAY(COUNTA(UNIQUE(AY%243%3AAY%2413))%2C1%2C%2C%2C))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhere%20I%20have%20data%20in%20column%20AY.%20The%20only%20problem%20I%20am%20facing%20is%20seeing%20%220%22%20in%20the%20result.%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20column%20AY%26nbsp%3B%20I%20have%20(AY3%20%3D%20%22%20BLUE%20%22%20AY4%20%3D%20%22RED%22%20)%20.%20The%20outcome%20after%20putting%20in%20a%20cell%20will%20be%20%22RED%22%20%22BLUE%22%20and%20a%20%220%22.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tens%20of%20columns%20like%20this%2C%20I%20am%20getting%20the%20result%20the%20only%20issue%20how%20to%20get%20rid%20of%20that%20%220%22%20so%20I%20can%20see%20only%20solid%20%22red%22%20and%20%22BLUE%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestion%3F%20it%20will%20be%20painful%20if%20I%20have%20to%20change%20the%20reference%20per%20column.%20because%20they%20are%20a%20lot.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1602217%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602217%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20you%20decided%20to%20drop%202%20parts%20of%20the%20formula%20out%3A%3C%2FP%3E%3CP%3Ethe%20INDEX(%20...%20%2C%20SEQUENCE(..))%20portion%20was%20to%20automatically%20fill%20down%20the%20number%20of%20unique%20random%20values%20you%20wanted%20(i.e.%20if%20you%20just%20copy%20your%20formula%20down%20you%20can%20get%20repeats%20while%20using%20the%20INDEX%20creates%20an%20array%20output%20using%20the%20same%20random%20array)%3C%2FP%3E%3CP%3Eand%20the%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CPRE%3EFILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1)%3C%2FPRE%3E%3CP%3Epart%20gets%20rid%20of%20the%20blanks%20so%20you%20don't%20get%20that%200.%26nbsp%3B%20It%20is%20repeated%20on%20both%20parts%20so%20the%20array%20lengths%20(without%20the%20blanks)%20are%20the%20same.%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20the%20original%20formula%20not%20work%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1602446%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602446%22%20slang%3D%22en-US%22%3E%3CP%3E%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%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3Eit%20is%20working%20but%20for%20example%2C%20if%20I%20do%20not%20have%20more%20than%205%20data%20in%20the%20reference%20column%2C%20let's%20say%202%2C%20the%20result%20will%20be%20the%20first%20two%20cells%20with%20data%20but%20the%20rest%20I%20received%20%22%23ref!%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20see%20just%20the%20result%20because%2C%20in%20the%20end%2C%20I%20have%20to%20manually%20on%20one%20delete%20those%20errors.%20taking%20so%20much%20time.%20%3B(%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1602475%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1602475%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F714984%22%20target%3D%22_blank%22%3E%40msm66%3C%2FA%3E%26nbsp%3B%20try%20wrapping%20the%20formula%20with%20an%20IFERROR()%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIFERROR(INDEX(SORTBY(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1))%2CRANDARRAY(COUNTA(UNIQUE(FILTER(%24A%241%3A%24A%2419%2CLEN(%24A%241%3A%24A%2419)%26gt%3B1)))%2C1%2C%2C%2C))%2CSEQUENCE(5))%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1603943%22%20slang%3D%22en-US%22%3ERe%3A%20HELP%20WITH%20VBA%20OR%20FORMULA%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603943%22%20slang%3D%22en-US%22%3Elovely%20and%20beautiful%3CBR%20%2F%3Ethank%20you%20for%20everything%3CBR%20%2F%3Eit%20works%20%3CLI-EMOJI%20id%3D%22lia_winking-face%22%20title%3D%22%3Awinking_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi ,

let's say I give you a list of fruits (something like the attachment) and ask you choose the one you like from each list. let's say there are "N" items in the list and you only like 10 of them the most.
now you start selecting or marking or checking the one you like. every time you select your choice will enter or type in another cell. or even you can select all in one time maybe through VBA you create a "run" button. by clicking the "run" all your choices will be enter to a new cell one on one.
so at the end i would have a column selection of your 10 choices of 50. hope the problem is clear.

 

thanks a lot

28 Replies
Highlighted

@msm66  Hi.  I've been toying with this latest request/comment and have been struggling with it.  First let me clarify what you want. 

Let's say you have the letters a-z in column A

then in column C you want a formula that will return a random selection from column A and that formula can return multiple UNIQUE random items so that no 2 items in column C are the same (e.g. 'm', 'g', 't', 'b')

then in column E you want to do the same and have unique random items from column A. 

My question is if this column E must also be unique from column C so 'n', 'c', 'r' would be ok but 't', ... would not because 't' was already selected in column C.

Also what happens if or when you don't have enough unique items left?

 

So the formula I gave before with an added index will give you a random selection of unique values from column A:

=INDEX(SORTBY(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1)),RANDARRAY(COUNTA(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1))),1,,,)),SEQUENCE(5))

where the range in this formula is $A$1:$A$19 and in this case it will only return the first 5 items it finds (see the '5' in the SEQUENCE() function)

This is DIFFERENT than your COUNTIF formula because no 2 cells in this response will be duplicates but using that COUNTIF and copying it down depending on the RAND() number generated there is a chance for a duplicate.

Now as for ANOTHER column that also pulls random items from A; if that has to also be UNIQUE from the previous selection of random pick, I'm at a loss.  I could do it using VBA and probably using a helper column, but your request to do it without, I couldn't figure out a way.  Feel free to post this NEW problem as a new topic and see if anyone else can help. 

That said, if I can convince you to just use a helper column (and just hide the column) then use the formula I gave in my previous response (without the INDEX portion) to create a UNIQUE random list from the original and then just look up a selection from each of the other columns.  First column could be direct references and then the second column can count how many are in the first column and OFFSET by that number plus its own row number ...  That is very possible.

 

Highlighted

@mtarler 

Thanks for taking your time and sorry if I gave you a hard time. I do not min if you cursed me a lot. lol

 

Well, I just used the formula and it is working but there is one problem. 

but let me first point to where I possibly did not explain it well. you are right about your example regarding column A and getting random in Column C. 

That is all I need. i am not going to take random from C and run it in E. 

I have column A TO Z . but I need random data from each column with no duplication into different cells.

your formula give me 5 rows since we put Sequence 5. I tried 1 and copy it in different cells and I see the duplicate again.

I have column A including A to Z . but looking for a formula when i copy and paste it let's say C1, C5, D5, D8 AND E3 none of the cells show me the same data. for example show me a, b, c, d, e. no duplicate. 

If you do not have any idea , that fine. i appreciate a lot it so far all the helps you did. 

 

 

Highlighted

@msm66  Yeah it still sounds like you want that column E in my example even if it is just 1 cell the point is that you want it to be unique from the cell in column C.  The problem is that when you copy that formula you have a new RAND() function that is completely independent from the previous and both RAND() could give the same or different answers so sometimes you can get the same output and sometimes you don't.  I tried to a bunch of tricks to include the previous RAND selection in the unique formula but they didn't work.  But those were 'general' solutions that would be 'flexible'.  let me ask if it is correct to make the following 'assumptions' about your data:

1) the original set of data doesn't have duplicates (i.e. no need to filter it)

2) you only need a few discreet selections

Here is an example of the formula I came up with:

=INDEX($A$1:$A$11,INDEX(SORT(ROW($A$1:$A$11)*($A$1:$A$11<>$C$1)*($A$1:$A$11<>$D$1),,-1),RAND()*SUM(--($A$1:$A$11<>$C$1)*($A$1:$A$11<>$D$1))))

where original data is $A$1:$A$11 then the 1st random selection was in C1 and the 2nd was in D1 and this is the 3rd selection   

See attached

 

Highlighted
Thank you so much and sorry for the late response. I finally had to use the helper column. it was a pain in the butt but I kinda make it happen.
I might have more questions in the future that will bother you soon again. lol
Thanks again.
Highlighted

@mtarler 

hi again, 

quick question, 

you helped this formula before to generate random data from a column with no duplication. 

=INDEX(SORTBY(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1)),RANDARRAY(COUNTA(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1))),1,,,)),SEQUENCE(5))

I modify the formula to 

=SORTBY(UNIQUE(AY$3:AY$13),RANDARRAY(COUNTA(UNIQUE(AY$3:AY$13)),1,,,))

 

where I have data in column AY. The only problem I am facing is seeing "0" in the result. 

in column AY  I have (AY3 = " BLUE " AY4 = "RED" ) . The outcome after putting in a cell will be "RED" "BLUE" and a "0". 

I have tens of columns like this, I am getting the result the only issue how to get rid of that "0" so I can see only solid "red" and "BLUE"

 

Any suggestion? it will be painful if I have to change the reference per column. because they are a lot. 

Highlighted

@msm66  you decided to drop 2 parts of the formula out:

the INDEX( ... , SEQUENCE(..)) portion was to automatically fill down the number of unique random values you wanted (i.e. if you just copy your formula down you can get repeats while using the INDEX creates an array output using the same random array)

and the  

FILTER($A$1:$A$19,LEN($A$1:$A$19)>1)

part gets rid of the blanks so you don't get that 0.  It is repeated on both parts so the array lengths (without the blanks) are the same. 

Did the original formula not work?

 

Highlighted

@mtarler 

Thanks

it is working but for example, if I do not have more than 5 data in the reference column, let's say 2, the result will be the first two cells with data but the rest I received "#ref!"

 

I am trying to see just the result because, in the end, I have to manually on one delete those errors. taking so much time. ;(

Highlighted

@msm66  try wrapping the formula with an IFERROR()

=IFERROR(INDEX(SORTBY(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1)),RANDARRAY(COUNTA(UNIQUE(FILTER($A$1:$A$19,LEN($A$1:$A$19)>1))),1,,,)),SEQUENCE(5)),"")
Highlighted
lovely and beautiful
thank you for everything
it works