SOLVED
Home

Creating tables and linking data

%3CLINGO-SUB%20id%3D%22lingo-sub-1046448%22%20slang%3D%22en-US%22%3ECreating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046448%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20create%20a%20simple%20database%20on%20excel%20since%20I%20really%20do%20not%20need%20anything%20complicated%20however%20I%20am%20having%20difficulties%20with%20the%20auto%20fill%20feature.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20main%20table%20and%20sub%20tables.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20sub%20tables%20are%20named%20volunteer1%2C%20volunteer2%2C%20volunteer3%20etc.%20At%20the%20moment%20I%20created%209%20such%20tables%20but%20with%20the%20course%20of%20the%20year%2C%20I%20might%20reach%20an%20amount%20of%2055%20tables%20or%20more.%20My%20first%20question%20is%2C%20is%20there%20a%20way%20to%20set%20up%20the%20naming%20of%20the%20new%20tables%20in%20such%20a%20way%20that%20Excel%20automatically%20names%20the%20tables%20by%20a%20sequence%20of%20numbers.%20So%20if%2C%20for%20example%2C%20I%20copy%20the%20volunteer9%20table%20and%20then%20paste%20it%20on%20the%20sheet%20and%20in%20that%20way%20create%20a%20new%20table%2C%20can%20I%20do%20it%20in%20such%20a%20way%20that%20Excel%20will%20automatically%20name%20it%20volunteer10.%20Right%20now%20what%20happens%20when%20I%20do%20this%20is%20that%20it%20gives%20it%20another%20strange%20number%20volunteer914.%20Is%20there%20another%20way%20to%20duplicate%20a%20table%20within%20the%20same%20sheet%20and%20have%20it%20auto%20fill%20the%20table%20name%20in%20a%20proper%20sequence%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20next%20question%20is%20about%20connecting%20cells%20from%20another%20table%3A%3C%2FP%3E%3CP%3EI%20need%20to%20connect%20one%20cell%20from%20my%20sub%20tables%20to%20a%20column%20in%20the%20main%20table.%20I%20have%20managed%20to%20connect%20the%20cell%20that%20I%20wanted%20to%20the%20main%20table%20but%20when%20I%20do%20so%2C%20it%20auto%20fills%20the%20rest%20of%26nbsp%3B%20the%20column%20with%20the%20exact%20same%20formula%20which%20is%3A%26nbsp%3B%20%3Dvolunteers1%5B%5B%23Totals%5D%2C%5BV%C3%A9g%C3%B6sszeg%5D%5D.%20What%20I%20would%20like%20him%20to%20do%20is%20change%20the%20name%20of%20the%20table%20automatically%20to%20volunteer2%20and%20so%20on%20until%20volunteer9%20and%20more%20as%20I%20add%20new%20tables%20to%20the%20sheet.%20Is%20that%20possible%20or%20do%20I%20need%20to%20do%20it%20manually%20every%20time%20I%20create%20a%20new%20table%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1046448%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046564%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046564%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20are%20going%20to%20have%20some%20problems%20simply%20because%20of%20your%20approach%20to%20storing%20data.%26nbsp%3B%20By%20using%20separate%20tables%20for%20data%20relating%20to%20each%20volunteer%2C%20rather%20that%20a%20single%20table%20in%20which%20the%20volunteer%20number%20(or%20name)%20is%20held%20as%20a%20field%2C%20you%20make%20aggregation%20and%20lookup%20difficult.%3C%2FP%3E%3CP%3EOne%20possibility%20is%20to%20build%20the%20structured%20reference%20to%20the%20data%20you%20require%20as%20a%20text%20string%20and%20then%20use%20%3CSTRONG%3EINDIRECT%3C%2FSTRONG%3E%20to%20turn%20it%20into%20a%20reference.%26nbsp%3B%20This%20would%20require%20something%20of%20the%20form%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CFONT%3E%3D%20INDIRECT(%20%22Volunteer%22%20%26amp%3B%20%5B%40%5B'%23%5D%5D%20%26amp%3B%20%22%5B%5B%23Totals%5D%2C%5BAmount%5D%5D%22%20)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CFONT%3Eif%20your%20tables%20are%20literally%20named%20%22Volunteer1%22%20%3CEM%3Eetc%3C%2FEM%3E.%20or%20to%20pick%20up%20the%20sub-table%20name%20from%20a%20list%20'directory'%20in%20a%20more%20general%20case.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CFONT%3E%3D%20INDIRECT(%20INDEX(directory%2C%20%5B%40%5B'%23%5D%5D)%20%26amp%3B%20%22%5B%5B%23Totals%5D%2C%5BAmount%5D%5D%22%20)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CFONT%3Ep.s.%20The%20fact%20that%20the%20formula%20propagates%20down%20is%20a%20good%20thing.%26nbsp%3B%20Formulas%20that%20change%20from%20record%20to%20record%20suggest%20that%20the%20data%20is%20not%20structured%20correctly.%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046768%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046768%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20Peter%20Bartholomew%20has%20already%20said%2C%20you%20may%20be%20making%20your%20task%20more%20difficult%20than%20it%20needs%20to%20be.%20A%20common%20mistake%20(and%20I%20hope%20you'll%20excuse%20my%20use%20of%20that%20word)%20in%20using%20Excel%20happens%20when%20the%20design%20or%20layout%20is%20based%20primarily%20around%20the%20ultimate%20output%20or%20report%20desired.%20I%20don't%20know%20that%20this%20is%20what%20you're%20doing%2C%20but%20it%20sounds%20like%20it%20could%20be.%20You%20say%20you're%20trying%20to%20design%20a%20%22simple%20database%22--but%20a%20true%20simple%20database%20would%20be%20all%20on%20one%20spreadsheet.%20You'd%20collect%20your%20data%20there%2C%20and%20%3CEM%3E%3CSTRONG%3Ethen%3C%2FSTRONG%3E%3C%2FEM%3E%20devise%20ways%20(using%20Pivot%20Table%20or%20Power%20Query%20or%20VLOOKUP%2C%20INDEX%20MATCH%2C%20etc)%20to%20display%20selected%20data%20in%20useful%20fashion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20other%20words%2C%20think%20of%20the%20input%20and%20collection%20of%20data%20as%20a%20task%20altogether%20separate%20from%20the%20output.%20Excel%20contains%20a%20number%20of%20powerful%20tools%20to%20manipulate%20data%3B%20we%20hinder%20it%20when%20we%20try%20to%20format%20the%20raw%20data%20in%20output%20layouts.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAgain%2C%20that%20may%20not%20be%20what%20you're%20doing....but%20it%20kind%20of%20looks%20like%20it.%20If%20you%20could%20upload%20the%20raw%20spreadsheets%2C%20some%20of%20us%20here%20might%20be%20better%20able%20to%20help%20with%20suggested%20alternatives.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046797%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046797%22%20slang%3D%22en-US%22%3EThank%20you%20for%20your%20answer.%3CBR%20%2F%3E%3CBR%20%2F%3EMaybe%20it%20would%20be%20more%20clear%20what%20I'm%20trying%20to%20do%20if%20the%20tables%20were%20in%20English.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20had%20one%20Excel%20table%2C%20the%20problem%20for%20me%20with%20that%20table%20was%20that%20one%20volunteer%20might%20work%20at%20different%20departments%20during%20his%20stay%20with%20us.%20So%20it%20was%20really%20awkward%20the%20way%20the%20sheet%20looked%20like%20and%20it%20wasn't%20working%20for%20me%20at%20all.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20would%20send%20a%20screenshot%20but%20I%20can't%20at%20the%20moment%20since%20I'm%20on%20my%20phone.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20created%20the%20extra%20sub%20tables%20so%20that%20each%20sub%20table%20includes%20the%20detailed%20information%20about%20which%20department%20he%20was%20at%20and%20for%20how%20long%20and%20so%20on%20and%20the%20main%20table%20just%20has%20the%20summary%20of%20expenses%20for%20each%20volunteer.%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20looks%20much%20cleaner%20like%20that%20and%20easier%20for%20me%20to%20organize%20the%20data%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1047027%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1047027%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20sadly%20my%20language%20abilities%20are%20limited%2C%20so%20English%20would%20have%20been%20clearer.%20But%20the%20main%20point%20still%20holds---the%20database%20on%20a%20single%20table%20and%20then%20the%20various%20reports%20or%20outputs%20extracted%20from%20that%20really%20works%20better.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EScreen%20shots%20are%20not%20(in%20general)%20anywhere%20near%20as%20helpful%20as%20actual%20spreadsheets--just%20make%20sure%20that%20personal%20or%20proprietary%20info%20is%20not%20included.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1047087%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1047087%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%3EIf%20you%20need%20any%20reassurance%2C%20your%20English%20is%20faultless.%3C%2FP%3E%3CP%3EThe%20many%20to%20many%20relationship%20between%20volunteers%20and%20departments%20could%20be%20challenge%20but%20it%20is%20difficult%20to%20assess%20without%20seeing%20a%20representative%20dataset.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1049182%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1049182%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20both%20for%20trying%20to%20help%20with%20this.%20I%20am%20sending%20you%20the%20spreed%20sheets.%20You%20will%20see%20the%20one%20I%20used%20this%20year.%20I%20basically%20designed%20my%20own%20%22table%22.%20My%20problem%20with%20this%20version%20and%20with%20trying%20to%20crate%20a%20real%20table%20in%20excel%20is%20that%20I%20cannot%20have%20more%20than%20one%20row%20per%20volunteer%20and%20since%20some%20of%20them%20volunteer%20in%20more%20than%20one%20department%20I%20need%20that%20feature.%20That%20is%20why%20I%20was%20thinking%20of%20creating%20a%20table%20per%20volunteer.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20know%20that%20my%20knowledge%20of%20Excel%20is%20very%20minimal%20so%20unless%20you%20do%20not%20explain%20to%20me%20any%20formulas%20you%20send%2C%20I%20might%20not%20know%20what%20you%20are%20talking%20about%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1049384%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1049384%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20attached%20file%20uses%20the%20INDIRECT%20function%20to%20reference%20parts%20of%20the%20sub-tables%20from%20a%20text%20string%20which%20is%20constructed%20to%20define%20the%20data%20to%20be%20returned.%26nbsp%3B%20If%20you%20wish%20to%20refer%20to%20your%20volunteers%20by%20name%2C%20you%20would%20need%20to%20build%20a%20list%20of%20Table%20Names%20based%20upon%20the%20volunteers'%20names.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20a%20comment%2C%20I%20would%20prefer%20to%20see%20all%20the%20detail%20tables%20combined%20into%20a%20single%20table%20with%20no%20subtotal%20rows.%26nbsp%3B%20Then%20all%20the%20totals%20could%20be%20calculated%20within%20the%20summary%20table%20using%20MAXIFS%2C%20SUMIFS%20etc.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1052410%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1052410%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20I%20guess%20there%20is%20no%20way%20to%20make%20Excel%20name%20a%20new%20table%20I%20create%20with%20a%20sequence%20number%20(I%20do%20not%20wish%20the%20tables%20to%20have%20the%20volunteer%20names).%20So%20if%20the%20last%20table%20I%20have%20is%20volunteer9%2C%20if%20I%20copy%20it%20and%20then%20paste%20it%20to%20create%20a%20new%20tables%20there%20is%20no%20way%20for%20excel%20to%20call%20it%20volunteer10%20instead%20of%20that%20other%20number%20it%20assigns%20automatically%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20other%20question%20is%2C%20in%20the%20%22total%20income%22%20column%20in%20the%20main%20table%2C%20is%20there%20no%20way%20to%20help%20excel%20auto%20fill%20the%20formula%20with%20the%20sequence%20table%20name%20rather%20than%20entering%20the%20exact%20same%20table%20names%20in%20all%20the%20rows%3F%20In%20other%20words%2C%20I%20do%20not%20wish%20to%20have%20volunteer1%5B%5B%23Totals%5D%2C%5BTotal%20income%5D%5D%20in%20all%20rows%2C%20just%20in%20the%20first%20row%2C%20the%20second%20row%20should%20have%20volunteer2%2C%20the%20third%20row%20volunteer3%20and%20so%20on.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1053101%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1053101%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3ESo%20I%20guess%20there%20is%20no%20way%20to%20make%20Excel%20name%20a%20new%20table%20I%20create%20with%20a%20sequence%20number%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EExcel%20seems%20to%20be%20something%20of%20a%20law%20unto%20itself%20when%20it%20comes%20to%20generating%20Table%20names%20when%20one%20copies%20and%20pastes.%26nbsp%3B%20I%20think%20you%20either%20have%20to%20rename%20them%20manually%20or%20use%20VBA%20to%20run%20through%20the%20ListObjects%20collection%20renaming%20them%20in%20sequence.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F477381%22%20target%3D%22_blank%22%3E%40Sukhayanti%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3EIn%20the%20%22total%20income%22%20column%20in%20the%20main%20table%2C%20is%20there%20no%20way%20to%20help%20excel%20auto%20fill%20the%20formula%20with%20the%20sequence%20table%20names%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3EThat%20is%20done%20in%20the%20file%20I%20attached%20for%20the%20Start%20Date%2C%20End%20Date%2C%20Total%20income%20and%20Name%20columns.%3C%2FP%3E%3CP%3EBy%20building%20each%20table%20name%20as%20a%20text%20string%20I%20was%20able%20to%20incorporate%20your%20record%20number%20%5B'%23%5D%20into%20the%20name%20and%20INDIRECT%20returns%20the%20corresponding%20reference.%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CFONT%3E%3D%20INDIRECT(%20%3CFONT%20color%3D%22%23008000%22%3E%22Volunteers%22%3C%2FFONT%3E%20%26amp%3B%20%3CFONT%20color%3D%22%23ff00ff%22%3E%5B%40%5B'%23%5D%5D%3C%2FFONT%3E%20%26amp%3B%20%3CFONT%20color%3D%22%23008000%22%3E%22%5B%5B%23Totals%5D%2C%5BTotal%20Income%5D%5D%22%3C%2FFONT%3E%20)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%3CEM%3ENote%3C%2FEM%3E%3A%3C%2FFONT%3E%3CSTRONG%3E%3CFONT%3E%3CSTRONG%3E%3CFONT%3E%3CFONT%20color%3D%22%23ff00ff%22%3E%5B%40%5B'%23%5D%5D%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FSTRONG%3E%3CEM%3E%3CFONT%3Eis%20the%20structured%20reference%20to%20the%20'%3C%2FFONT%3E%3C%2FEM%3E%3CFONT%3E%3CSTRONG%3E%23%3C%2FSTRONG%3E%3C%2FFONT%3E%3CEM%3E%3CFONT%3E'%20column%20within%20the%20current%20record%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1055340%22%20slang%3D%22en-US%22%3ERe%3A%20Creating%20tables%20and%20linking%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1055340%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much%20for%20all%20the%20detailed%20help.%20I%20did%20not%20noticed%20the%20attached%20file%20in%20your%20previous%20email.%20Thank%20you%20for%20that!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20to%20search%20for%20more%20information%20about%20VBA%2C%20but%20that%20is%20obviously%20something%20I%20would%20really%20need%20to%20study%20before%20I%20can%20even%20try%20to%20do%20it.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Sukhayanti
Occasional Contributor

Hi,

 

I am trying to create a simple database on excel since I really do not need anything complicated however I am having difficulties with the auto fill feature. 

 

I have created a main table and sub tables.

 

The sub tables are named volunteer1, volunteer2, volunteer3 etc. At the moment I created 9 such tables but with the course of the year, I might reach an amount of 55 tables or more. My first question is, is there a way to set up the naming of the new tables in such a way that Excel automatically names the tables by a sequence of numbers. So if, for example, I copy the volunteer9 table and then paste it on the sheet and in that way create a new table, can I do it in such a way that Excel will automatically name it volunteer10. Right now what happens when I do this is that it gives it another strange number volunteer914. Is there another way to duplicate a table within the same sheet and have it auto fill the table name in a proper sequence? 

 

My next question is about connecting cells from another table:

I need to connect one cell from my sub tables to a column in the main table. I have managed to connect the cell that I wanted to the main table but when I do so, it auto fills the rest of  the column with the exact same formula which is:  =volunteers1[[#Totals],[Végösszeg]]. What I would like him to do is change the name of the table automatically to volunteer2 and so on until volunteer9 and more as I add new tables to the sheet. Is that possible or do I need to do it manually every time I create a new table?

 

Thank you in advance

10 Replies
Highlighted

@Sukhayanti 

You are going to have some problems simply because of your approach to storing data.  By using separate tables for data relating to each volunteer, rather that a single table in which the volunteer number (or name) is held as a field, you make aggregation and lookup difficult.

One possibility is to build the structured reference to the data you require as a text string and then use INDIRECT to turn it into a reference.  This would require something of the form

= INDIRECT( "Volunteer" & [@['#]] & "[[#Totals],[Amount]]" )

if your tables are literally named "Volunteer1" etc. or to pick up the sub-table name from a list 'directory' in a more general case.

= INDIRECT( INDEX(directory, [@['#]]) & "[[#Totals],[Amount]]" )

 

p.s. The fact that the formula propagates down is a good thing.  Formulas that change from record to record suggest that the data is not structured correctly.

Highlighted

@Sukhayanti 

 

As Peter Bartholomew has already said, you may be making your task more difficult than it needs to be. A common mistake (and I hope you'll excuse my use of that word) in using Excel happens when the design or layout is based primarily around the ultimate output or report desired. I don't know that this is what you're doing, but it sounds like it could be. You say you're trying to design a "simple database"--but a true simple database would be all on one spreadsheet. You'd collect your data there, and then devise ways (using Pivot Table or Power Query or VLOOKUP, INDEX MATCH, etc) to display selected data in useful fashion.

 

In other words, think of the input and collection of data as a task altogether separate from the output. Excel contains a number of powerful tools to manipulate data; we hinder it when we try to format the raw data in output layouts. 

 

Again, that may not be what you're doing....but it kind of looks like it. If you could upload the raw spreadsheets, some of us here might be better able to help with suggested alternatives.

Highlighted
Thank you for your answer.

Maybe it would be more clear what I'm trying to do if the tables were in English.

I had one Excel table, the problem for me with that table was that one volunteer might work at different departments during his stay with us. So it was really awkward the way the sheet looked like and it wasn't working for me at all.

I would send a screenshot but I can't at the moment since I'm on my phone.

I created the extra sub tables so that each sub table includes the detailed information about which department he was at and for how long and so on and the main table just has the summary of expenses for each volunteer.

It looks much cleaner like that and easier for me to organize the data
Highlighted

@Sukhayanti 

 

Yes, sadly my language abilities are limited, so English would have been clearer. But the main point still holds---the database on a single table and then the various reports or outputs extracted from that really works better.

 

Screen shots are not (in general) anywhere near as helpful as actual spreadsheets--just make sure that personal or proprietary info is not included.

Highlighted

@mathetes 

If you need any reassurance, your English is faultless.

The many to many relationship between volunteers and departments could be challenge but it is difficult to assess without seeing a representative dataset.

Highlighted

@Peter Bartholomew 

@mathetes 

 

Thank you both for trying to help with this. I am sending you the spreed sheets. You will see the one I used this year. I basically designed my own "table". My problem with this version and with trying to crate a real table in excel is that I cannot have more than one row per volunteer and since some of them volunteer in more than one department I need that feature. That is why I was thinking of creating a table per volunteer.

 

Please know that my knowledge of Excel is very minimal so unless you do not explain to me any formulas you send, I might not know what you are talking about  

Highlighted
Solution

@Sukhayanti 

The attached file uses the INDIRECT function to reference parts of the sub-tables from a text string which is constructed to define the data to be returned.  If you wish to refer to your volunteers by name, you would need to build a list of Table Names based upon the volunteers' names.

 

As a comment, I would prefer to see all the detail tables combined into a single table with no subtotal rows.  Then all the totals could be calculated within the summary table using MAXIFS, SUMIFS etc.

Highlighted

@Peter Bartholomew 

 

Thank you for your reply. 

 

So I guess there is no way to make Excel name a new table I create with a sequence number (I do not wish the tables to have the volunteer names). So if the last table I have is volunteer9, if I copy it and then paste it to create a new tables there is no way for excel to call it volunteer10 instead of that other number it assigns automatically? 

 

The other question is, in the "total income" column in the main table, is there no way to help excel auto fill the formula with the sequence table name rather than entering the exact same table names in all the rows? In other words, I do not wish to have volunteer1[[#Totals],[Total income]] in all rows, just in the first row, the second row should have volunteer2, the third row volunteer3 and so on.

 

Thank you

Highlighted

@Sukhayanti 


@Sukhayanti wrote:

So I guess there is no way to make Excel name a new table I create with a sequence number


Excel seems to be something of a law unto itself when it comes to generating Table names when one copies and pastes.  I think you either have to rename them manually or use VBA to run through the ListObjects collection renaming them in sequence.

 


@Sukhayanti wrote:

In the "total income" column in the main table, is there no way to help excel auto fill the formula with the sequence table names


That is done in the file I attached for the Start Date, End Date, Total income and Name columns.

By building each table name as a text string I was able to incorporate your record number ['#] into the name and INDIRECT returns the corresponding reference.

= INDIRECT( "Volunteers" & [@['#]] & "[[#Totals],[Total Income]]" )

 

Note:[@['#]]is the structured reference to the '#' column within the current record

Highlighted

@Peter Bartholomew 

 

Thank you so much for all the detailed help. I did not noticed the attached file in your previous email. Thank you for that!

 

I have tried to search for more information about VBA, but that is obviously something I would really need to study before I can even try to do it. 

Related Conversations
History and Data
rosenbloomsnka in Microsoft To Do on
0 Replies
How often the sync is triggered?
HotCakeX in Discussions on
5 Replies
Filter complex table to simple table
Sam2009 in Excel on
1 Replies