Excel ühendab mitu töölehte üheks tööleheks. Igal töölehel võib olla päevast päeva erinev arv kirjeid, nii et valemid pole õige tee. Selle asemel võimaldab vähetuntud tööriist nimega Power Query andmeid lihtsalt ja kiiresti ühendada.
Vaata videot
- Doug: Kuidas ühendada neli lehte, kus kummalgi on erinev arv ridu?
- Kasutage Power Query
- Vormindage iga tööleht tabelina, kasutades klahvikombinatsiooni Ctrl + T
- Nimetage tabelid ümber
- Iga tabeli jaoks uus päring tabelist. Lisage piirkonna jaoks kohandatud veerg
- Sulgemise ja laadimise asemel valige käsk Sule ja laadige … Loo ainult ühendus
- Kasuta uut päringut, kombineeri päringut, lisa. 3 või rohkem tabelit. Valige Tabelid ja Lisa
- Sulgege ja laadige ning andmed ilmuvad uuel töölehel
- Ühe lisaveeruga tabeli puhul: andmed kuvatakse ainult selle lehe kirjete kohta
- Ühe tabeli jaoks, kus veerud olid vales järjekorras: Power Query töötas õigesti!
- Hiljem on seda lihtne värskendada
Automaatselt loodud ärakiri
- Õppige Exceli Podcast Episode'ist
- 2178 ühendab tänased töölehed
- YouTube'i kaudu Dougilt pärinev küsimus
- olukorras on meil neli lehte, kus kumbki
- leht on müügiandmetega ja
- - kirjete arv muutub kuus ja
- praegu üritab Doug kasutada valemeid
- aga kui ridade arv muutis seda
- saab õudusunenägu, nii et ma ütlesin hei
- Doug, kas me võime kasutada elektriküsimust, kui teil seda on
- Excel 2010 või Excel 2013 on see tasuta
- laadige alla Microsofti või see on ehitatud
- 2016. aastasse ja Office 365-sse ütleb see kõik jah
- nii, siin on meil see, mis meil on
- neli teatavad keskpiirkonnast idas
- piirkonnas lõuna piirkonnas ja läänes
- piirkonnas ja igaühel neist on erinev
- arv plaate nagu siin lõunas
- Piirkonnas on meil idas 72 kirjet
- piirkonna 193 arvestust ja see läheb
- paremale vahetama
- iga kord, kui seda aruannet koostame, on
- nüüd on mul erinev arv plaate
- tegi siin kõigepealt mõned eeldused, et
- pole veergu, mille nimi on keskne ja
- siis olen ka täiesti kuri
- siia ja võta lõunapiirkond, kuhu tahan
- proovin selle kokku keerata, ma võtan selle
- kasum veerg lõigake see ja kleepige see kuidas
- pöörake need tagasi ja siis on kõik korras, nii et meie
- on üks, kus veerud on ümber pööratud
- ja siis veel üks, kuhu me läheme
- lisage täiendav veerg brutokasumi protsent
- nii et see saab olema kasum jagatud
- ideaalses maailmas on see kõik
- kuju täpselt sama, kuid nagu ma õppisin
- hiljuti tegin aastal aastal seminari
- Põhja-Carolina, kui nendega pole kõik korras
- kellelgi oli olukord hästi teada
- poole aasta jooksul asjad muutusid
- ja nad lisasid uue veeru või kolimise
- veerud ümber olime tõeliselt õnnelikud
- vaata, et võimupäring suutis hakkama saada
- sellega on kõik korras, nii et me võtame
- kõik need aruanded ja teha seda
- ametlik tabelivorming nagu tabel
- see on kontrolltee või võite kasutada a
- nimevahemik minu jaoks kontroll t on
- lihtsam tee ja mida nad siin teevad
- kas nad nimetavad seda lauda selliseks, et ma hakkan
- nimetage see ümber nimeks keskne ja
- siis läheme edasi Ida juhtimisele ja klõpsake nuppu OK
- ja seda nimetatakse nüüd ida, hei
- varasemas podcastis näitasin, kuidas oleks
- need on olnud neli eraldi faili
- oleks võinud kasutada energiapäringut ainult selleks
- faile kombineerida, kuid see ei tööta siis, kui
- need on neli eraldi või neli töölehte
- samas raamatus nii hästi seal me
- mine ja siis
- nagu see kontroll-t natuke tüütu
- seadistas selle esimest korda, kuid poiss
- tuleb vinge
- iga kord, kui peate seda hiljem värskendama
- edasi, nii et me läheme
- valida see esimene tabel keskne
- piirkonnas ja kui olete aastatel 2010 või 2013 ja
- allalaaditud voolupäring, mida te sellega saate
- mul on oma vaheleht, kuid 16-s
- Excel 2016 on tegelikult saamas
- teisendatud, mis on grupi teine rühm
- office 365 on nüüd muutumas
- mis on esimene rühm ja nii me oleme
- ütlen, et nad kavatsevad selle luua
- andmed tabelist või vahemikust kõik korras ja
- there is our data now we don't have a
- region field and the combined files
- would have added the region field so in
- this case I'm just gonna add a column a
- new custom call the headings gonna be
- region and this one is going to be what
- was this central right like that
- click OK alright now here's the
- important part when we're done this with
- this we're gonna go home not choose
- close and load we're gonna open the
- drop-down close and load to only create
- a connection click OK
- perfect we have our connection only now
- the next thing we have to do is repeat
- these steps for the next three regions
- and now that would be really a bit
- boring to you so let's just speed up the
- video to 10x for this
- alright there we are for connections set
- up now here's where we're going to do
- the magic I'm gonna insert a new blank
- worksheet and I'm gonna say get data
- combine queries and I want to append two
- queries from this workbook and I'm gonna
- say three or more tables and the
- available tables are Central through
- West click Add BAM click OK and then we
- can close and load and what we have here
- is we have a superset of all of the
- records in all of the tables all right
- and where we tried to screw it up where
- I purposely tried to screw up by
- reversing cost of goods sold and profit
- down in what was that that was Central
- East South in the South Region I'll just
- go check those right and it looks like
- yeah generally feels right they used the
- heading to figure it out because the
- profit is always higher than cost of
- goods sold and so that worked and then
- down here in the West where we added
- gross profit percent we actually get
- that data for the tables that had it and
- for the tables that didn't have it we
- just get null which is perfect alright
- now duck
- here's what you're gonna do so the next
- time that you have some more data and
- I'll just let's create some some extra
- records here we'll just add some ABC
- with a date of today and all retail and
- it's called Doug's new records and just
- some garbage out here let's just put in
- a hundred all the way across in the
- interest of time okay so now because
- this is a table the table automatically
- expands to the new records which is
- beautiful had they been named range I
- would have had a redefine that's why I
- really like the table instead of the
- name range but we come back here to the
- resulting workbook with 563 rows loaded
- and I click refresh
- and bam now I have 572 Rose loaded
- including let's see if we can find them
- in here
- Doug's new records right there at the
- end of the South Region
- isn't that just an awesome awesome way
- to go yes it definitely takes longer to
- set up the first day we're up to seven
- minutes already if I hadn't sped that up
- to 10x but once it's set up now life is
- gonna be super super easy from here on
- out way this is where I usually promote
- my own book but no this time let's talk
- about this awesome book Emma's for data
- monkey by Ken polls in Miguel Escobar
- everything I learned about power query I
- learned from this book look at the eye
- on the top right hand corner for more
- information about that book all right
- wrap up topics in this episode Doug how
- to combine four sheets where each sheet
- has a different number of rows we can
- use power query make sure to format each
- worksheet as a table with ctrl T or use
- named ranges but I prefer ctrl T rename
- the tables from each table choose new
- query from table add a custom column for
- a region and then instead of close and
- load choose close and load to only
- create a connection do that for all four
- queries and then new query combined
- query append choose three or more tables
- choose the tables and click Add
- now some older versions of power query
- you couldn't do three or more tables you
- have to do two and then do another query
- to add the third one and then do another
- query to add the fourth one either way
- it would be more hassle that way I'm
- glad that they added the three or more
- tables close and load this time close
- and load to the worksheet and and then
- later on if you add more data to any of
- the four tables just go back to your
- query and click refresh and you're good
- to go
- power query and amazing new feature from
- Microsoft I love it I thank Doug for
- ütlesin selle küsimuse hästi aitäh
- peatumiseks näeme järgmine kord
- teise valatud võrgu jaoks
Laadige fail alla
Laadige näidisfail alla siit: Podcast2178.xlsm