Excel combină mai multe foi de lucru într-o singură foaie de lucru. Fiecare foaie de lucru poate avea un număr diferit de înregistrări de la o zi la alta, astfel încât formulele nu sunt calea de urmat. În schimb, un instrument puțin cunoscut numit Power Query vă va permite să îmbinați datele simplu și rapid.
Urmăriți videoclipul
- Doug: Cum se combină patru foi în care fiecare are un număr diferit de rânduri?
- Folosiți Power Query
- Formatați fiecare foaie de lucru ca tabel cu Ctrl + T
- Redenumiți tabelele
- Pentru fiecare tabel, interogare nouă Din tabel. Adăugați o coloană personalizată pentru regiune
- În loc de Închidere & Încărcare, alegeți Închidere și Încărcare în … Creați doar o conexiune
- Utilizați interogare nouă, combinați interogare, adăugați. 3 sau mai multe tabele. Alegeți tabelele și adăugați
- Închideți și încărcați și datele apar pe o foaie de lucru nouă
- Pentru un tabel cu coloană suplimentară: datele sunt afișate numai pentru înregistrările acelei foi
- Pentru un tabel în care coloanele erau într-o ordine greșită: Power Query a funcționat corect!
- Ușor de reîmprospătat mai târziu
Transcriere generată automat
- Aflați Excel din Podcast Episode
- 2178 fuzionează pentru foile de lucru de astăzi
- întrebarea prin YouTube de la Doug are acest lucru
- situație avem patru foi unde fiecare
- foaia este o regiune cu date de vânzări și
- numărul înregistrărilor se schimbă lunar și
- chiar acum Doug încearcă să folosească formule
- dar când numărul de rânduri a schimbat asta
- devine un drept de coșmar așa că am spus hei
- Doug, putem folosi interogarea de energie, dacă aveți
- Excel 2010 sau Excel 2013 este gratuit
- descărcați de la Microsoft sau este construit
- în 2016 și Office 365 spune da tuturor
- așa că iată ce avem avem
- patru raportează regiunea centrală de est
- regiunea regiunea sudică și vestica
- regiune și fiecare are o altă
- numărul de înregistrări ca aici în sud
- Regiune avem 72 de înregistrări în est
- regiunea 193 înregistrează și asta se va întâmpla
- schimbă dreapta
- de fiecare dată când vom executa acest raport va avea
- acum am un număr diferit de înregistrări
- a făcut câteva presupuneri aici mai întâi că
- nu există o coloană numită centrală și
- atunci, de asemenea, voi fi complet rău
- aici și ia Regiunea Sud vreau
- Încearcă să-l înșurub, o să iau
- coloana de profit tăiați-o și lipiți-o cum
- inversați-le și apoi bine, așa că noi
- au una în care coloanele sunt inversate
- și apoi altul în care vom merge
- adăugați o coloană suplimentară la sută profit brut
- deci acest lucru va fi profit împărțit la
- veniturile într-o lume ideală acestea sunt toate
- modelat exact la fel, dar așa cum am învățat
- recent făceam un seminar în
- Carolina de Nord, dacă nu sunt bine
- cineva a avut o situație bine știți
- la jumătatea anului lucrurile s-au schimbat
- și au adăugat o nouă coloană sau mutare
- coloane din jurul am fost foarte fericiți să
- vezi că interogarea de putere a reușit să se ocupe
- cu asta în regulă, așa că o să luăm
- fiecare dintre aceste rapoarte și transformați-le în
- un format oficial de tabel ca tabel așa
- asta este ceaiul de control sau ai putea folosi un
- intervalul de nume pentru mine control t este
- modalitate mai ușoară de a merge și ce fac aici
- o numesc această masă una pe care o voi face
- redenumiți acest lucru pentru a fi numit central și
- apoi trecem la controlul estic T faceți clic pe OK
- și asta se va numi Est acum hei
- pe un podcast anterior am arătat cum dacă
- acestea au fost patru fișiere separate noi
- ar fi putut folosi interogarea de energie doar pentru
- combinați fișiere, dar asta nu funcționează când
- sunt patru foi de lucru separate sau patru
- în aceeași carte atât de bine acolo noi
- du-te și apoi
- ca acest control-un pic plictisitor
- montează asta prima dată, dar băiete
- va fi minunat
- de fiecare dată când trebuie să actualizați acest lucru mai târziu
- așa că vom face este să mergem
- pentru a alege această primă masă centrală
- regiune și dacă sunteți în 2010 sau 2013 și
- interogare de energie descărcată o să fie
- o să aibă propria filă, dar în 16 in
- Excel 2016 devine de fapt
- transformat care este al doilea grup din
- Office 365 se transformă acum
- care este primul grup și așa suntem
- Voi spune că vor crea asta
- date dintr-un tabel sau interval bine și
- 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
- spunând întrebarea asta bine mulțumesc
- pentru că ne-am oprit ne vedem data viitoare
- pentru o altă distribuție netă din
Descărcare fișier
Descărcați exemplul de fișier aici: Podcast2178.xlsm