„Excel“ sujungia kelis darbalapius į vieną darbalapį. Kiekviename darbalapyje kiekvieną dieną gali būti skirtingas įrašų skaičius, todėl formulės nėra tinkamas būdas. Vietoj to, mažai žinomas įrankis, vadinamas „Power Query“, leis paprastai ir greitai sujungti duomenis.
Žiūrėti video
- Dougas: Kaip sujungti keturis lapus, kur kiekviename yra skirtingas eilučių skaičius?
- Naudokite „Power Query“
- Suformatuokite kiekvieną darbalapį kaip lentelę naudodami „Ctrl“ + T
- Pervardykite lenteles
- Kiekvienai lentelei reikia naujos užklausos iš lentelės. Pridėkite pasirinktinį regiono stulpelį
- Užuot uždarę ir įkėlę, pasirinkite Uždaryti ir įkelti tik… Sukurkite tik ryšį
- Naudoti naują užklausą, sujungti užklausą, pridėti. 3 ar daugiau lentelių. Pasirinkite lenteles ir pridėkite
- Uždarykite ir įkelkite, o duomenys bus rodomi naujame darbalapyje
- Vienos lentelės su papildomu stulpeliu duomenys rodomi tik to lapo įrašuose
- Vienai lentelei, kurioje stulpeliai buvo išdėstyti netinkama tvarka: „Power Query“ veikė tinkamai!
- Vėliau lengva atnaujinti
Automatiškai sugeneruotas nuorašas
- Sužinokite „Excel“ iš „Podcast Episode“
- 2178 m. Sujungti šiandienos darbalapiai
- klausimas per „YouTube“ iš Dougo turi tai
- mes turime keturis lapus, kur kiekvienas
- lapas yra regionas su pardavimo duomenimis ir
- įrašų skaičius keičiasi kas mėnesį ir
- dabar Dougas bando naudoti formules
- bet kai eilučių skaičius pasikeitė
- tampa košmaru, todėl pasakiau ei
- Ar galime naudoti galios užklausą, jei turite
- „Excel 2010“ arba „Excel 2013“ - tai nemokama
- atsisiųsti iš „Microsoft“ arba jis sukurtas
- į 2016 m. ir „Office 365“ jis sako „taip“
- tiesa, štai ką mes turime
- keturi praneša apie centrinį regioną rytuose
- regionas pietų regionas ir vakarai
- regionas ir kiekvienas turi skirtingą
- įrašų, kaip čia, pietuose, skaičius
- Regione turime 72 įrašus rytuose
- regiono 193 įrašai ir tai vyksta
- pakeisti dešinę
- kaskart vykdysime šią ataskaitą
- dabar turiu kitokį įrašų skaičių
- pirmiausia čia padarė keletą prielaidų
- nėra kolonos, vadinamos centrine ir
- tada aš taip pat būsiu visiškai blogas
- čia ir pasiimk norimą Pietų regioną
- pabandyk ir užsuk, aš imsiuosi
- pelno stulpelyje jį supjaustyti ir įklijuoti kaip
- atvirkščiai tuos ir tada viskas gerai, kad mes
- turi vieną, kur stulpeliai yra atvirkščiai
- ir tada dar vienas, kuriame mes eisime
- pridėkite papildomą stulpelį bendro pelno procentų
- taigi tai bus pelnas, padalytas iš
- pajamos idealiame pasaulyje yra visos
- formos lygiai tokios pačios, bet kaip aš sužinojau
- neseniai rengiau seminarą
- Šiaurės Karolina, jei jiems ne viskas gerai
- kažkas turėjo gerai žinomą situaciją
- įpusėjus metams viskas pasikeitė
- ir jie pridėjo naują stulpelį arba perkėlė
- kolonų aplink mes tikrai džiaugėmės
- pamatyti, kad galios užklausa sugebėjo išspręsti
- viskas gerai, todėl mes imsimės
- kiekvieną iš šių ataskaitų ir į ją įtraukite
- oficialus lentelės formatas kaip ir lentelė
- tai kontrolinė arbata arba galite naudoti a
- pavadinimų diapazonas man kontrolė t yra
- ir ką jie čia veikia
- ar jie vadina šią lentelę viena
- pervadinti tai vadinti centriniu ir
- tada einame į Rytų valdymą T spustelėkite Gerai
- o tai bus vadinama Rytais, hei
- ankstesniame tinklalaidėje parodžiau, kaip, jei
- tai buvo keturios atskiros bylos
- galėjo naudoti galios užklausą tik tam, kad
- sujungti failus, bet tai neveikia, kai
- jie yra keturi atskiri arba keturi darbalapiai
- toje pačioje knygoje taip gerai ten mes
- eik ir tada
- patinka ši kontrolė-t šiek tiek varginantis
- tai nustatė pirmą kartą, bet berniukas
- bus nuostabu
- kiekvieną kartą, kai teks tai atnaujinti vėliau
- tai mes ketiname padaryti, tai mes einame
- pasirinkti šią pirmąją lentelę centrinę
- regione ir jei esate 2010 ar 2013 m
- atsisiųstą maitinimo užklausą
- turėsi savo skirtuką, bet 16 in
- „Excel 2016“ iš tikrųjų gauna
- transformuota, kuri yra antroji grupė
- „Office 365“ dabar keičiasi
- kuri yra pirmoji grupė ir mes taip
- sakysiu, kad jie ketino tai sukurti
- duomenys iš lentelės ar diapazono yra teisingi ir
- 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
- sakydamas šį klausimą, ačiū
- už tai, kad užsukote, susitiksime kitą kartą
- kitam tinklui, išlietam iš
Atsisiųsti failą
Atsisiųskite failo pavyzdį čia: Podcast2178.xlsm