Ett genomsnitt som utesluter nollvärden Veronica vet hur man använder funktionen AVERAGE för att bestämma genomsnittet av ett antal värden. Hon skulle vilja ha det genomsnittliga beslutet baserat på de icke-nollvärdena i intervallet. Arbetsbladets funktion som passar bäst för detta ändamål är att använda AVERAGEIF. Du kan använda det på följande sätt: Den här funktionen inkluderar i genomsnitt de celler som innehåller värden som är större än noll. Om du också vill utesluta tomma celler, ska du använda funktionen AVERAGEIFS. Den här funktionen skiljer sig från AVERAGEIF, eftersom den tillåter dig att ange flera kriterier som anger vilka celler som ska vara genomsnittliga. Självklart, om du vill närma dig problemet med gamla skolor (utan att använda AVERAGEIF eller AVERAGEIFS), så finns det flera sätt att fortsätta. Den första är att komma ihåg hur ett medel beräknas. Det definieras som summan av ett antal värden dividerat med antalet objekt i intervallet. Således kan du räkna ut det uteslutande genomsnittet genom att helt enkelt se till att nämnaren (det antal du delar med) innehåller inga nollvärden. Till exempel: Denna metod använder COUNTIF-funktionen för att bestämma antalet celler i intervallet (A1: A50) som inte innehåller noll. Om det här intervallet inte bara innehåller nollor, men också tomma celler, och du inte vill att de tomma cellerna räknas in i resultatet, måste du använda en mer komplex formel: COUNTIF-funktionen räknas celler som inte uttryckligen utvärderar till 0, men det kommer att räkna tomma och textceller. COUNTBLANK-termen justeras för de tomma cellerna och skillnaden mellan COUNTA och COUNT justerar totalantalet för celler som innehåller text. Naturligtvis kan du också använda en matrisformel för att göra din beräkning: Kom ihåg att matrisformler måste anges med hjälp av kombinationen CtrlShiftEnter. Denna array formel utesluter även blankor eller celler innehållande text. Sammantaget är det lättare att använda funktionerna AVERAGEIF eller AVERAGEIFS. När vill du inte använda dem När du behöver dela din arbetsbok med användare av Excel-versioner före Excel 2007. (Det här är när funktionerna lagts till i Excel.) Lägg till, ändra, hitta eller radera villkorliga format Läs mer om villkorlig formatering Med villkorlig formatering kan du visuellt besvara specifika frågor om dina data. Du kan använda villkorlig formatering till ett cellintervall, en Microsoft Excel-tabell eller en PivotTable-rapport. Det finns viktiga skillnader att förstå när du använder villkorad formatering på en PivotTable-rapport. Fördelarna med villkorlig formatering När du analyserar data frågar du dig ofta frågor, till exempel: Var finns undantagen i en sammanfattning av vinsten under de senaste fem åren Vad är trenderna i en marknadsundersökningsundersökning de senaste två åren Vem har sålt mer än 50 000 dollar i månaden Vad är den totala åldersfördelningen för anställda Vilka produkter har fler än 10 inkomstökningar från år till år? Vilka är de högst fungerande och lägsta utbildningsstuderande i nybörjarklassen Villkorlig formatering hjälper till att svara på dessa frågor genom att göra det lätt markera intressanta celler eller cellintervall, betona ovanliga värden och visualisera data med hjälp av databar, färgskalor och ikonuppsättningar. Ett villkorligt format ändrar utseendet på ett cellintervall baserat på villkor (eller kriterier). Om villkoret är sant, formateras cellintervallet baserat på det tillståndet om villkoret är felaktigt, cellintervallet är inte formaterat baserat på det tillståndet. Du kan sortera och filtrera efter format, inklusive cellfärg och teckensnittfärg, oavsett om du har manuellt eller skickligt formaterat cellerna. Obs! När du skapar ett villkorligt format kan du bara referera till andra celler i samma arbetsblad eller, i vissa fall, celler på arbetsblad i samma, öppna arbetsbok. Du kan inte använda villkorlig formatering på externa referenser till en annan arbetsbok. Villkorlig formatering för en PivotTable-rapport Villkorlig formatering i en PivotTable-rapport skiljer sig från villkorlig formatering i ett cellintervall eller ett Excel-bord på flera sätt: Om du ändrar layouten för PivotTable-rapporten genom att filtrera, dölja nivåer, kollapsa och expandera nivåer eller Om ett fält flyttas hålls det villkorliga formatet så länge som fälten i underliggande data inte tas bort. Omfattningen av det villkorliga formatet för fält i värdena kan baseras på datahierarkin och bestäms av alla synliga barn (nästa lägre nivå i en hierarki) hos en förälder (nästa högre nivå i en hierarki) på rader för en eller flera kolumner, eller kolumner för en eller flera rader. Obs! I datahierarkin arver inte barn villkorlig formatering från föräldern, och föräldern arver inte villkorlig formatering från barnen. Det finns tre metoder för att scoping det villkorliga formatet av fält i värdena område: genom val, motsvarande fält och värdefält. Standardmetoden för scoping-fält i området Values är genom val. Du kan ändra scopingmetoden till motsvarande fält eller värdefält genom att använda knappen Använd formateringsformulär till alternativknappen, dialogrutan Ny formateringsregel eller Redigera formateringsregeldialogrutan. De tre metoderna för scoping (Home tab, Styles group, Conditional Formatting-kommandot) ger dig större flexibilitet beroende på dina behov: Omfattning genom val Använd den här metoden om du vill välja: En sammanhängande uppsättning fält i värdena, som alla av produktens totalvärden för en region. En otvetydig uppsättning fält i värdena, till exempel produkttotal för olika regioner över nivåer i datahierarkin. Omfattning enligt värdefält Använd den här metoden om du vill: Undvik att göra många diskreta val. Formatera villkorligt en uppsättning fält i värdena för alla nivåer i datahierarkin. Inkludera subtotaler och grand totaler. Omfattning av motsvarande fält Använd den här metoden om du vill: Undvik att göra många diskreta val. Formatera skickligt en uppsättning fält i området Värden för en nivå i datahierarkin. När du formaterar fält i området Values för topp, botten, över genomsnittet eller under genomsnittliga värden, är regeln baserad på alla synliga värden som standard. Men när du räcker med motsvarande fält istället för att använda alla synliga värden kan du valfritt tillämpa det villkorliga formatet för varje kombination av: En kolumn och dess förra radfält. En rad och dess parentes kolumnfält. Villkorlig formatering över kalkylblad Du kan använda villkorlig formatering på celler som refereras i ett annat kalkylblad i samma arbetsbok. Denna funktion är inte tillgänglig mellan arbetsböckerna. Formatera alla celler med hjälp av tvåfärgskalor Färgskalor är visuella guider som hjälper dig att förstå datafördelning och variation. En tvåfärgskala hjälper dig att jämföra ett antal celler genom att använda en gradering av två färger. Färgans färg representerar högre eller lägre värden. I en grön och röd färgskala kan du till exempel ange att högre värdeceller har en mer grön färg och lägre värdeceller har en mer röd färg. Om en eller flera celler i intervallet innehåller en formel som returnerar ett fel tillämpas inte den villkorliga formateringen på hela intervallet. För att säkerställa att den villkorliga formateringen tillämpas på hela intervallet, använd en IS eller IFERROR-funktion för att returnera ett annat värde än ett felvärde. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Färgskala. Välj en tvåfärgskala. Håll över ikonerna för färgskala för att se vilken ikon som är en tvåfärgskala. Toppfärgen representerar högre värden, och den nedersta färgen representerar lägre värden. Du kan ändra metoden för scoping för fält i värdena i en pivottabellrapport med hjälp av knappen Formateringsalternativ som visas bredvid ett pivottabellfält som har villkorlig formatering tillämpad. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. Dialogrutan Ny formateringsregel visas. Gör så här om du vill ändra ett villkorligt format: Kontrollera att lämpligt kalkylblad, tabell eller PivotTable-rapport är markerat i listningsformat för Visa för listrutan. Ändra valfritt cellområdet genom att klicka på Dölj dialog i rutan Gäller för att tillfälligt dölja dialogrutan genom att välja det nya sortimentet av celler i arbetsbladet och sedan välja Expand dialog. Välj regeln och klicka sedan på Redigera regel. Dialogrutan Redigera formateringsregel visas. Under Tillämpa regel till. för att eventuellt ändra räckvidd för fält i värdena i en PivotTable-rapport genom att: Markera, klicka på Markerade celler. Alla celler för en värdeetikett klickar på Alla celler som visar ltValue labelgt-värden. Alla celler för en värdeetikett, exklusive subtotaler och totalvärdet, klickar på Alla celler som visar ltValue labelgt-värden för ltRow Labelgt. Under Välj en regeltyp. klicka på Formatera alla celler baserat på deras värden (standard). Under Ändra Regel Beskrivning. Markera 2-färgskala i listrutan Formatformat. För att välja en typ i rutan Typ för Minimum och Maximum. gör något av följande: Formatera lägsta och högsta värdena Välj lägsta värde och högsta värde. I det här fallet anger du inte ett lägsta och högsta värde. Formatera ett nummer, datum eller tidvärde Välj Nummer. och ange sedan ett minimi - och maximivärde. Formatera en procentandel Välj procent. och ange sedan ett minimi - och maximivärde. Giltiga värden är från 0 (noll) till 100. Ange inte ett procenttecken. Använd en procentandel när du vill visualisera alla värden proportionellt eftersom fördelningen av värden är proportionell. Formatera en percentil Välj Percentil och ange sedan ett Minsta och Högsta värde. Giltiga procentiler är från 0 (noll) till 100. Använd en percentil när du vill visualisera en grupp höga värden (som topp 20thpercentilen) i en färgkvotandel och låga värden (som den 20: e 20 procenten av procenten) i en annan färg grade-andel, eftersom de representerar extrema värden som kan skeva visualiseringen av dina data. Formatera ett formelresultat Välj Formel. och ange sedan värden för Minimum och Maximum. Formeln måste returnera ett nummer, datum eller tidvärde. Starta formeln med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Se till att minimivärdet är mindre än det maximala värdet. Du kan välja en annan typ för Minimum och Maximum. Du kan till exempel välja ett nummer för Minsta procent för Max. För att välja en Minimal och Maximal färgskala, klicka på Färg för varje och välj sedan en färg. Om du vill välja ytterligare färger eller skapa en anpassad färg klickar du på Fler färger. Färgskalan som du väljer visas i förhandsgranskningsrutan. Formatera alla celler med hjälp av en färg i tre färger Färgskalor är visuella guider som hjälper dig att förstå datafördelning och variation. En trefärgskala hjälper dig att jämföra ett antal celler genom att använda en gradering av tre färger. Färgans färg representerar högre, mellersta eller lägre värden. Till exempel, i en grön, gul och röd färgskala kan du ange att högre värdeceller har en grön färg, mellanvärdescellerna har en gul färg och lägre värdeceller har en röd färg. Om en eller flera celler i intervallet innehåller en formel som returnerar ett fel tillämpas inte den villkorliga formateringen på hela intervallet. För att säkerställa att den villkorliga formateringen tillämpas på hela intervallet, använd en IS eller IFERROR-funktion för att returnera ett värde som du anger (t. ex. 0 eller NA) istället för ett felvärde. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Färgskala. Välj en trefärgskala. Den övre färgen representerar högre värden, mittfärgen representerar medelvärden och den nedersta färgen representerar lägre värden. Håll över ikonerna för färgskala för att se vilken ikon är en trefärgskala. Du kan ändra metoden för scoping för fält i värdena i en pivottabellrapport med hjälp av knappen Formateringsalternativ som visas bredvid ett pivottabellfält som har villkorlig formatering tillämpad. Välj en eller flera celler i ett intervall, bord eller pivottabell rapportera. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. Dialogrutan Ny formateringsregel visas. Gör så här om du vill ändra ett villkorligt format: Kontrollera att lämpligt kalkylblad, tabell eller PivotTable-rapport är markerat i listningsformat för Visa för listrutan. Ändra valfritt cellområdet genom att klicka på Dölj dialog i rutan Gäller för att tillfälligt dölja dialogrutan genom att välja det nya sortimentet av celler i arbetsbladet och sedan välja Expand dialog. Välj regeln och klicka sedan på Redigera regel. Dialogrutan Redigera formateringsregel visas. Under Tillämpa regel till. för att eventuellt ändra räckvidd för fält i värdena i en PivotTable-rapport genom att: Markera, klicka bara på dessa celler. Motsvarande fält, klicka på All ltvalue Fieldgt-celler med samma fält. Värdet fält, klicka på All ltvalue fieldgt celler. Under Välj en regeltyp. klicka på Formatera alla celler baserat på deras värden. Under Ändra Regel Beskrivning. Markera 3-färgskala i listrutan Formatformat. Välj en typ för Minimum. Midpoint. och maximalt. Gör något av följande: Formatera lägsta och högsta värden Välj en mittpunkt. I det här fallet anger du inte ett lägsta och högsta värde. Formatera ett nummer, datum eller tidvärde Välj Nummer. och ange sedan ett värde för Minimum. Midpoint. och maximalt. Formatera en procentandel Välj procent. och ange sedan ett värde för Minimum. Midpoint. och maximalt. Giltiga värden är från 0 (noll) till 100. Ange inte ett procenttal () tecken. Använd en procentandel när du vill visualisera alla värden proportionellt, eftersom en procentandel garanterar att fördelningen av värden är proportionell. Formatera en percentil Välj Percentil och ange sedan ett värde för Minimum. Midpoint. och maximalt. Giltiga procentiler är från 0 (noll) till 100. Använd en percentil när du vill visualisera en grupp höga värden (till exempel 20: e percentilen) i en färgkvotandel och låga värden (såsom 20: e 20 procenten) i en annan färgkvalitetsandel, eftersom de representerar extrema värden som kan skada visualiseringen av dina data. Formatera ett formelresultat Välj Formel. och ange sedan ett värde för Minimum. Midpoint. och maximalt. Formeln måste returnera ett nummer, datum eller tidvärde. Starta formeln med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Du kan ställa in minimi-, mittpunkts - och maximivärden för cellintervallet. Se till att värdet i Minimum är mindre än värdet i Midpoint. vilket i sin tur är mindre än värdet i Maximum. Du kan välja en annan typ för Minimum. Midpoint. och maximalt. Du kan till exempel välja ett minimumsnummer, midpoint percentil och maximalt procent. I många fall fungerar standardvärdet för mittpunkten på 50 procent bäst, men du kan justera detta för att passa unika krav. Att välja en Minimum. Midpoint. och Maximal färgskala, klicka på Färg för varje och välj sedan en färg. Om du vill välja ytterligare färger eller skapa en anpassad färg klickar du på Fler färger. Färgskalan som du väljer visas i förhandsgranskningsrutan. Formatera alla celler genom att använda datalistor En datafält hjälper dig att se värdet på en cell i förhållande till andra celler. Längden på datafältet representerar värdet i cellen. En längre stapel representerar ett högre värde och en kortare stapel representerar ett lägre värde. Datafält är användbara för att upptäcka högre och lägre siffror, speciellt med stora mängder data, såsom toppsäljande och bästsäljande leksaker i en semesterförsäljningsrapport. Tips: Om en eller flera celler i intervallet innehåller en formel som returnerar ett fel tillämpas inte den villkorliga formateringen på hela intervallet. För att säkerställa att den villkorliga formateringen tillämpas på hela intervallet, använd en IS eller IFERROR-funktion för att returnera ett värde (till exempel 0 eller NA) istället för ett felvärde. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i Style-gruppen, klicka på pilen bredvid Villkorlig formatering. klicka på Data Bars. och välj sedan en datafältikon. Du kan ändra metoden för scoping för fält i fältet Värden i en PivotTable-rapport genom att använda knappen Använd formatering till alternativknappen. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. Dialogrutan Ny formateringsregel visas. Gör så här om du vill ändra ett villkorligt format: Kontrollera att lämpligt kalkylblad, tabell eller PivotTable-rapport är markerat i listningsformat för Visa för listrutan. Ändra valfritt cellområdet genom att klicka på Dölj dialog i rutan Gäller för att tillfälligt dölja dialogrutan genom att välja det nya sortimentet av celler i arbetsbladet och sedan välja Expand dialog. Välj regeln och klicka sedan på Redigera regel. Dialogrutan Redigera formateringsregel visas. Under Tillämpa regel till. för att eventuellt ändra räckvidd för fält i värdena i en PivotTable-rapport genom att: Markera, klicka bara på dessa celler. Motsvarande fält, klicka på All ltvalue Fieldgt-celler med samma fält. Värdet fält, klicka på All ltvalue fieldgt celler. Under Välj en regeltyp. klicka på Formatera alla celler baserat på deras värden. Under Ändra Regel Beskrivning. I listrutan Formatformat väljer du Datafält. Välj en Minimum och Maximum Type. Gör något av följande: Formatera lägsta och högsta värdena Välj lägsta värde och högsta värde. I det här fallet anger du inte ett värde för Minimum och Maximum. Formatera ett nummer, datum eller tidvärde Välj Nummer. och ange sedan ett minimi - och maximivärde. Formatera en procentandel Välj procent. och ange sedan ett värde för Minimum och Maximum. Giltiga värden är från 0 (noll) till 100. Ange inte ett procenttal () tecken. Använd en procentandel när du vill visualisera alla värden proportionellt, eftersom en procentandel garanterar att fördelningen av värden är proportionell. Formatera en percentil Välj Percentil och ange sedan ett värde för Minimum och Maximum. Giltiga procentiler är från 0 (noll) till 100. Använd en percentil när du vill visualisera en grupp höga värden (som topp 20: e percentilen) i en databarandel och låga värden (t. ex. 20: e 20 procenten) i en annan datafältet, eftersom de representerar extrema värden som kan skada visualiseringen av dina data. Formatera ett formelresultat Välj Formel. och ange sedan ett värde för Minimum och Maximum. Formeln måste returnera ett nummer, datum eller tidvärde. Starta formeln med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Se till att minimivärdet är mindre än det maximala värdet. Du kan välja en annan typ för Minimum och Maximum. Du kan till exempel välja ett lägsta antal och ett maximalt procent. För att välja en Minimal och Maximal färgskala, klicka på Bar Color. Om du vill välja ytterligare färger eller skapa en anpassad färg klickar du på Fler färger. Den stapelfärg du väljer visas i förhandsgranskningsrutan. Om du bara vill visa datafältet och inte värdet i cellen väljer du Visa endast bar. Om du vill tillämpa en solid gräns för databar väljer du Solid Border i listrutan Border och väljer en färg för gränsen. Om du vill välja mellan en solid stapel och en graderad stapel väljer du Solid Fill eller Gradient Fyll i listrutan Fyll i. Om du vill formatera negativa staplar klickar du på Negativt värde och axel och väljer sedan alternativ för den negativa stapelfyllningen och kantfärgerna i dialogrutan Negativa värde och Axelinställningar. Du kan välja positionsinställningar och en färg för axeln. När du är klar väljer du alternativ, klicka på OK. Du kan ändra riktning av staplar genom att välja en inställning i listrutan Bar Direction. Det här är inställt på kontext som standard, men du kan välja mellan en vänster-till-höger och en vänster-vänster riktning beroende på hur du vill presentera dina data. Formatera alla celler med hjälp av en ikonuppsättning Använd en ikonuppsättning för att kommentera och klassificera data i tre till fem kategorier separerade med ett tröskelvärde. Varje ikon representerar en rad värden. I den 3-pils-ikonuppsättningen representerar den gröna pilen högre värden, den gula sido-pilen representerar medelvärden och den röda pilen representerar lägre värden. Du kan välja att bara visa ikoner för celler som uppfyller ett villkor, till exempel, visar en varningsikon för de celler som faller under ett kritiskt värde och inga ikoner för de som överstiger det. För att göra detta döljer du ikoner genom att välja Ingen cellikon från rullgardinsmenyn i ikonen när du ställer in villkor. Du kan också skapa din egen kombination av ikonuppsättningar, till exempel en grön symbolmarkering, ett gult trafikljus och en röd flagga. Problem: Villkorlig formatering visas inte för någon cell i intervallet Om en eller flera celler i intervallet innehåller en formel som returnerar ett fel tillämpas inte den villkorliga formateringen på hela intervallet. För att säkerställa att den villkorliga formateringen tillämpas på hela intervallet, använd en IS eller IFERROR-funktion för att returnera ett värde (till exempel 0 eller NA) istället ett felvärde. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i Style-gruppen, klicka på pilen bredvid Villkorlig formatering. klicka på ikonuppsättning. och välj sedan en ikonuppsättning. Du kan ändra metoden för scoping för fält i fältet Värden i en PivotTable-rapport genom att använda knappen Använd formatering till alternativknappen. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. Dialogrutan Ny formateringsregel visas. Gör så här om du vill ändra ett villkorligt format: Kontrollera att lämpligt kalkylblad, tabell eller PivotTable-rapport är markerat i listningsformat för Visa för listrutan. Ändra valfritt cellområdet genom att klicka på Dölj dialog i rutan Gäller för att tillfälligt dölja dialogrutan genom att välja det nya sortimentet av celler i arbetsbladet och sedan välja Expand dialog. Välj regeln och klicka sedan på Redigera regel. Dialogrutan Redigera formateringsregel visas. Under Tillämpa regel till. för att eventuellt ändra räckvidd för fält i värdena i en PivotTable-rapport genom att: Markera, klicka bara på dessa celler. Motsvarande fält, klicka på All ltvalue Fieldgt-celler med samma fält. Värdet fält, klicka på All ltvalue fieldgt celler. Under Välj en regeltyp. klicka på Formatera alla celler baserat på deras värden. Under Ändra Regel Beskrivning. I listrutan Formatformat väljer du Ikonuppsättning. Välj en ikonuppsättning. Standardinställningen är 3 trafikljus (Unrimmed). Antal ikoner och standard jämförelse operatörer och tröskelvärden för varje ikon kan variera för varje ikonuppsättning. Om du vill kan du justera jämförelseoperatörerna och tröskelvärdena. Standardvärdet av värden för varje ikon är lika stor, men du kan justera dessa för att passa dina unika krav. Se till att tröskelvärdena är i en logisk följd av högsta till lägsta från topp till botten. Gör något av följande: Formatera ett nummer, datum eller tidvärde Välj Nummer. Formatera en procentandel Välj procent. Giltiga värden är från 0 (noll) till 100. Ange inte ett procenttal () tecken. Använd en procentandel när du vill visualisera alla värden proportionellt, eftersom en procentandel garanterar att fördelningen av värden är proportionell. Formatera en percentil Välj Percentil. Giltiga procentiler är från 0 (noll) till 100. Använd en percentil när du vill visualisera en grupp höga värden (till exempel den 20: e percentilen) med en viss ikon och låga värden (till exempel den 20: e percentilen) med en annan ikon , eftersom de representerar extrema värden som kan skeva visualiseringen av dina data. Formatera ett formelresultat Välj Formel. och ange sedan en formel i varje värdefält. Formeln måste returnera ett nummer, datum eller tidvärde. Starta formeln med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Om du vill göra den första ikonen representerar lägre värden och den sista ikonen representerar högre värden, välj Omvänd ikonbeställning. Om du bara vill visa ikonen och inte värdet i cellen väljer du Visa endast ikon. Du kan behöva justera kolumnbredden för att rymma ikonen. Det finns tre storlekar på ikoner. Storleken på ikonen som visas beror på teckensnittstorleken som används i den cellen. Formater bara celler som innehåller text, nummer eller datum eller tidvärden För att lättare hitta specifika celler inom ett antal celler kan du formatera de specifika cellerna baserat på en jämförelseoperatör. Till exempel i ett arbetsblad som sorterats efter kategorier kan du markera produkterna med färre än 10 objekt till hands i gult. Eller i ett detaljhandelsöversikt arbetsblad kan du identifiera alla butiker med vinst större än 10, försäljningsvolymer mindre än 100 000 och region lika med SouthEast. Obs! Du kan inte formatera fält medvetet i området Värden i en PivotTable-rapport via text eller datum, endast efter nummer. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i Style-gruppen, klicka på pilen bredvid Villkorlig formatering. och klicka sedan på Highlight Cells Rules. Markera det kommando du vill ha, till exempel Mellan. Lika till text som innehåller. eller ett datum som inträffar. Ange de värden du vill använda och välj sedan ett format. Du kan ändra metoden för scoping för fält i fältet Värden i en PivotTable-rapport genom att använda knappen Använd formatering till alternativknappen. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. Dialogrutan Ny formateringsregel visas. Gör så här om du vill ändra ett villkorligt format: Kontrollera att lämpligt kalkylblad, tabell eller PivotTable-rapport är markerat i listningsformat för Visa för listrutan. Ändra eventuellt cellerna genom att klicka på Dölj dialog i rutan Gäller för att tillfälligt dölja dialogrutan genom att välja det nya sortimentet av celler på arbetsbladet eller på andra arbetsblad och sedan välja Expand dialog. Välj regeln och klicka sedan på Redigera regel. Dialogrutan Redigera formateringsregel visas. Under Tillämpa regel till. för att eventuellt ändra räckvidd för fält i värdena i en PivotTable-rapport genom att: Markera, klicka bara på dessa celler. Motsvarande fält, klicka på All ltvalue Fieldgt-celler med samma fält. Värdet fält, klicka på All ltvalue fieldgt celler. Under Välj en regeltyp. klicka på Formater bara celler som innehåller. Under Ändra Regel Beskrivning. Gör något av följande i formatera endast celler med listrutan: Format efter nummer, datum eller tid Välj Cellvärde. välj en jämförelseoperatör och ange sedan ett nummer, datum eller tid. Till exempel, välj Mellan och ange sedan 100 och 200. eller välj Lika till och ange sedan 112009. Du kan också ange en formel som returnerar ett nummer, datum eller tidvärde. Om du skriver in en formel, starta den med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Formatera med text Välj Särskild text. välj en jämförelseoperatör och skriv sedan in text. Till exempel väljer du Innehåller och anger sedan Silver. eller välj Börja med och ange Tri. Citat ingår i söksträngen, och du kan använda jokertecken. Den maximala längden på en sträng är 255 tecken. Du kan också ange en formel som returnerar text. Om du skriver in en formel, starta den med ett lika tecken (). Ogiltiga formler resulterar i att ingen formatering tillämpas. Det är en bra idé att testa formeln för att se till att det inte returnerar ett felvärde. Formatera efter datum Välj datum som förekommer. och välj sedan en datumjämförelse. Välj till exempel igår eller nästa vecka. Formatera celler med blanks eller inga blanketter Välj Blanks eller No Blanks. Ett tomt värde är en cell som inte innehåller data och skiljer sig från en cell som innehåller ett eller flera mellanslag (mellanslag anses vara text). Formatera celler med fel eller inga felvärden Välj Fel eller Inga fel. Felvärdena inkluderar:, VALUE. DIV0. NAMN. NA, REF. NUM. och NULL. Om du vill ange ett format klickar du på Format. Dialogrutan Formatceller visas. Markera numret, typsnittet, gränsen eller fyllformatet som du vill tillämpa när cellvärdet uppfyller villkoret och klicka sedan på OK. Du kan välja mer än ett format. De format du väljer visas i förhandsgranskningsrutan. Formatera bara värden för topp eller botten rankad Du kan hitta de högsta och lägsta värdena i ett antal celler som baseras på ett cutoff-värde du anger. Till exempel kan du hitta de 5 bästa försäljningsprodukterna i en regional rapport, de 15 sista produkterna i en kundundersökning eller de 25 största lönerna i en avdelnings personalanalys. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i Style-gruppen, klicka på pilen bredvid Villkorlig formatering. och klicka sedan på TopBottom Rules. Välj det kommando du vill ha, till exempel Top 10-artiklar eller Bottom 10. Ange de värden du vill använda och välj sedan ett format. Du kan ändra metoden för scoping för fält i fältet Värden i en PivotTable-rapport genom att använda knappen Använd formatering till alternativknappen. Markera en eller flera celler i en rad, tabell eller pivottabellrapport. På fliken Startsida, i gruppen Stilar, klickar du på pilen bredvid Villkorlig formatering. och klicka sedan på Hantera regler. Dialogrutan för villkorlig formatering av reglerhanteraren visas. Gör något av följande: Om du vill lägga till ett villkorligt format klickar du på Ny regel. The New Formatting Rule dialog box is displayed. To change a conditional format, do the following: Make sure that the appropriate worksheet, table, or PivotTable report is selected in the Show formatting rules for list box. Optionally, change the range of cells by clicking Collapse Dialog in the Applies to box to temporarily hide the dialog box, by selecting the new range of cells on the worksheet, and then by selecting Expand Dialog . Select the rule, and then click Edit rule . The Edit Formatting Rule dialog box is displayed. Under Apply Rule To . to optionally change the scope fields in the Values area of a PivotTable report by: Selection, click Just these cells . Corresponding field, click All ltvalue fieldgt cells with the same fields . Value field, click All ltvalue fieldgt cells . Under Select a Rule Type . click Format only top or bottom ranked values . Under Edit the Rule Description . in the Format values that rank in the list box, select Top or Bottom . Do one of the following: To specify a top or bottom number, enter a number and then clear the of the selected range check box. Valid values are 1 to 1000. To specify a top or bottom percentage, enter a number and then select the of the selected range check box. Valid values are 1 to 100. Optionally, change how the format is applied for fields in the Values area of a PivotTable report that are scoped by corresponding field. By default, the conditional format is based on all visible values. However when you scope by corresponding field, instead of using all visible values, you can apply the conditional format for each combination of: A column and its parent row field, by selecting each Column group . A row and its parent column field, by selecting each Row group . To specify a format, click Format . The Format Cells dialog box is displayed. Select the number, font, border, or fill format that you want to apply when the cell value meets the condition, and then click OK . You can choose more than one format. The formats that you select are displayed in the Preview box. Format only values that are above or below average You can find values above or below an average or standard deviation in a range of cells. For example, you can find the above average performers in an annual performance review or you can locate manufactured materials that fall below two standard deviations in a quality rating. Select one or more cells in a range, table, or PivotTable report. On the Home tab, in the Style group, click the arrow next to Conditional Formatting . and then click TopBottom Rules . Select the command that you want, such as Above Average or Below Average . Enter the values that you want to use, and then select a format. You can change the method of scoping for fields in the Values area of a PivotTable report by using the Apply formatting rule to option button. Select one or more cells in a range, table, or PivotTable report. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting . and then click Manage Rules . The Conditional Formatting Rules Manager dialog box is displayed. Do one of the following: To add a conditional format, click New Rule . The New Formatting Rule dialog box is displayed. To change a conditional format, do the following: Make sure that the appropriate worksheet, table, or PivotTable report is selected in the Show formatting rules for list box. Optionally, change the range of cells by clicking Collapse Dialog in the Applies to box to temporarily hide the dialog box, by selecting the new range of cells on the worksheet, and then by selecting Expand Dialog . Select the rule, and then click Edit rule . The Edit Formatting Rule dialog box is displayed. Under Apply Rule To . to optionally change the scope for fields in the Values area of a PivotTable report by: Selection, click Just these cells . Corresponding field, click All ltvalue fieldgt cells with the same fields . Value field, click All ltvalue fieldgt cells . Under Select a Rule Type . click Format only values that are above or below average . Under Edit the Rule Description . in the Format values that are list box, do one of the following: To format cells that are above or below the average for all of the cells in the range, select Above or Below . To format cells that are above or below one, two, or three standard deviations for all of the cells in the range, select a standard deviation. Optionally, change how the format is applied for fields in the Values area of a PivotTable report that are scoped by corresponding field. By default, the conditionally format is based on all visible values. However when you scope by corresponding field, instead of using all visible values, you can apply the conditional format for each combination of: A column and its parent row field, by selecting each Column group . A row and its parent column field, by selecting each Row group . Click Format to display the Format Cells dialog box. Select the number, font, border, or fill format that you want to apply when the cell value meets the condition, and then click OK . You can choose more than one format. The formats that you select are displayed in the Preview box. Format only unique or duplicate values Note: You cannot conditionally format fields in the Values area of a PivotTable report by unique or duplicate values. Select one or more cells in a range, table, or PivotTable report. On the Home tab, in the Style group, click the arrow next to Conditional Formatting . and then click Highlight Cells Rules . Select Duplicate Values . Enter the values that you want to use, and then select a format. Select one or more cells in a range, table, or PivotTable report. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting . and then click Manage Rules . The Conditional Formatting Rules Manager dialog box is displayed. Do one of the following: To add a conditional format, click New Rule . The New Formatting Rule dialog box is displayed. To change a conditional format, do the following: Make sure that the appropriate worksheet or table is selected in the Show formatting rules for list box. Optionally, change the range of cells by clicking Collapse Dialog in the Applies to box to temporarily hide the dialog box, by selecting the new range of cells on the worksheet, and then by selecting Expand Dialog . Select the rule, and then click Edit rule . The Edit Formatting Rule dialog box is displayed. Under Select a Rule Type . click Format only unique or duplicate values . Under Edit the Rule Description . in the Format all list box, select unique or duplicate . Click Format to display the Format Cells dialog box. Select the number, font, border, or fill format that you want to apply when the cell value meets the condition, and then click OK . You can choose more than one format. The formats that you select are displayed in the Preview box. Use a formula to determine which cells to format If your conditional formatting needs are more complex, you can use a logical formula to specify the formatting criteria. For example, you may want to compare values to a result returned by a function or evaluate data in cells outside the selected range, which can be in another worksheet in the same workbook. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting . and then click Manage Rules . The Conditional Formatting Rules Manager dialog box is displayed. Do one of the following: To add a conditional format, click New Rule . The New Formatting Rule dialog box is displayed. To change a conditional format, do the following: Make sure that the appropriate worksheet, table, or PivotTable report is selected in the Show formatting rules for list box. Optionally, change the range of cells by clicking Collapse Dialog in the Applies to box to temporarily hide the dialog box, by selecting the new range of cells on the worksheet or other worksheets, and then by selecting Expand Dialog . Select the rule, and then click Edit rule . The Edit Formatting Rule dialog box is displayed. Under Apply Rule To . to optionally change the scope for fields in the Values area of a PivotTable report by: Selection, click Selected cells . Corresponding field, click All cells showing ltValues fieldgt values . Value field, All cells showing ltValues fieldgt for ltRowgt . Under Select a Rule Type . click Use a formula to determine which cells to format . Under Edit the Rule Description . in the Format values where this formula is true list box, enter a formula. You must start the formula with an equal sign () and the formula must return a logical value of TRUE (1) or FALSE (0). Example 1: Use one conditional format with multiple criteria and cell references outside of the range of cells In this formula, one conditional format with multiple criteria applied to the range A1:A5 formats the cells green if the average value for all of the cells in the range is greater than the value in cell F1 and any cell in the range has a minimum value greater than or equal to the value in G1. Cells F1 and G1 are outside of the range of cells for which the conditional format is applied. The AND function combines multiple criteria, and the AVERAGE and MIN functions calculate the values. Green cell color Example 2: Shade every other row by using the MOD and ROW functions This formula shades every other row in the range of cells a blue cell color. The MOD function returns a remainder after a number (the first argument) is divided by divisor (the second argument). The ROW function returns the current row number. When you divide the current row number by 2, you always get either a 0 remainder for an even number or a 1 remainder for an odd number. Because 0 is FALSE and 1 is TRUE, every odd numbered row is formatted. Blue cell color Click Format to display the Format Cells dialog box. Select the number, font, border, or fill format that you want to apply when the cell value meets the condition, and then click OK . You can choose more than one format. The formats that you select are displayed in the Preview box. You can enter cell references in a formula by selecting cells directly on a worksheet or other worksheets. Selecting cells on the worksheet inserts absolute cell references. If you want Excel to adjust the references for each cell in the selected range, use relative cell references. Find cells that have conditional formats If your worksheet has one or more cells with a conditional format, you can quickly locate them so that you can copy, change, or delete the conditional formats. You can use the Go To Special command to either find only cells with a specific conditional format or find all cells with conditional formats. Find all cells that have a conditional format Click any cell without a conditional format. On the Home tab, in the Editing group, click the arrow next to Find amp Select . and then click Conditional Formatting . Find only cells with the same conditional format Click the cell that has the conditional format that you want to find. On the Home tab, in the Editing group, click the arrow next to Find amp Select . and then click Go To Special . Click Conditional formats . Click Same under Data validation . Clear conditional formats Do one of the following: On the Home tab, in the Styles group, click the arrow next to Conditional Formatting . and then click Clear Rules Click Entire Sheet . In a range of cells, table, or PivotTable Select the range of cells, table, or PivotTable for which you want to clear conditional formats. On the Home tab, in the Styles group, click the arrow next to Conditional Formatting . and then click Clear Rules . Depending on what you have selected, click Selected Cells . This Table . or This PivotTable. How to Use Excel: The Top 10 Things to Learn Excel is one of the most powerful software tools in the world for collecting, analyzing, and summarizing data. But its incredible power comes at a cost: Excel is a massive program, and it can take beginners months or even years to master it. Many first-time Excel users dont take advantage of all of the programs functionality we often find new learners manually entering data when they could be using formulas and functions to speed up and expedite their work. With that in mind, weve compiled a list of the 10 most important places to start when youre learning how to use Excel. The goal of this guide is to familiarize you with Excels most useful functions mdash not to provide an in-depth overview of all of them. If you find yourself struggling to follow along, use the Further Reading section of each chapter for more detailed tutorials and additional examples. Without further ado: heres our beginners primer on how to use Excel mdash from worksheet basics to formulas and functions to Pivot Tables. Cell and workbook basics Before getting started with Excel, its important to learn the programs basic structure so that you can navigate it effectively. Each Excel file is called a workbook mdash we often use the terms workbook and file interchangably when talking about Excel. Like many other programs, Excel allows you to save, open, and close workbooks from the File menu, which is located in the top left corner of the screen in the Ribbon. the menu of options along the top of an Excel document. Pressing File leads us to the backstage view. an administrative area that gives us access to Excels most important workbook-handling functions: Save. Open. Print. and Close : Within each workbook, Excel contains multiple worksheets. which appear as tabs along the bottom of the screen. Worksheets are an easy way to contain multiple pages of data within one workbook in a logical manner. Generally, we place every individual calculation or table within its own worksheet to keep our data organized and easily accessible. Each worksheet contains a grid of rows. columns. and cells. Rows appear along the side of the sheet, and are labeled using numbers starting with 1. Columns appear along the top of the sheet, and are labeled using letters starting with A. At the intersection of every row and column lies a cell, which is referred to by its address. which is a combination of its row number and cell letter. For example, the cell C5 lies at the intersection of row 5 and column C . We can also refer to cells using ranges. which are series of contigous cells that lie next to each other. For example, the range between cells C3 and C6 can be selected all at once (see screenshot below). When we refer to a cell range, we put a colon (. ) between the first and last cells within that range. Below, weve highlighted the range C3:C6 : When you select a cell and start typing, you can insert data into that cell. Data comes in a variety of formats, including numbers, letters, and equations. Any individual cell can contain any of the following types of data accepted by Excel: Numbers . which are numerical values like 5 or 78.34. Numbers can be used as part of calculations like addition, subtraction, and multiplication. Strings . which are bits of text like Boston or SnackWorld. Strings can be manipulated in various ways, like finding pieces of text within them or chopping them in half. Datum. which represent days in our standard calendar, like 5192019 . Cell references . which point Excel to other cells in your workbook, like C9. Well learn more about cell references further on in this tutorial. Functions . which are formulas that allow you to quickly and easily perform calculations that would be difficult to do by hand. These functions are often based on the contents of other cells within your workbook, and can output numbers, strings, or dates. And if you enter a function into Excel that doesnt make sense, itll give you an error. like NA. Whenever you see an error like this, it means that theres a problem with your function and you need to revise it. Those are the basics of workbooks and cells, but theres lots more to learn. Check out the more detailed articles below for further reading. Further reading Save three hours of work a day with these 5 simple Excel hacks Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on how to automate your work using Excel. Why the TRUE and FALSE functions are so important. Why to rethink the way you do VLOOKUPs . Plus, well reveal why you shouldnt use PivotTables and what to use instead. Sorting and filtering data One of the simplest and most immediately useful features of Excel is that it can sort and filter large sets of data incredibly quickly and easily. You can use this capability to alphabetize lists, order sales numbers by value, or screen lists down to a small subset of items based on criteria that you specify. Take, for example, the below list, which contains a number of rows representing items sold by customer: The above is a useful list, but it would be easier to read if we could sort by customer name to group all sales to the same customer together. To sort a list, position your cursor in the header cell of the column youd like to sort, head to the Data tab on the Ribbon, and click the Quick sort button. In the below example, weve selected cell C2 to tell Excel that we want to sort by Customer name. Note our results after we press the Quick Sort button, which is highlited in yellow on the ribbon of the page below: We can also sort data based on more advanced parameters by highlighting our entire data set and pressing the Sort button in the Data tab, highlighted in yellow below: Pressing this button will open the Sort dialogue. which allows us to specify a set of more complicated sorting criteria mdash including sorting by multiple fields in a specified order. In addition to sorting, we can also filter our data. Filtering means cutting down a large data set to a smaller subset of rows that satisfy certain specified criteria. To test filtering, well place our cursor within our data table, then head to the Data tab on the ribbon and hit the Filter option, highlighted in yellow below: Notice that after filtering our data, small dropdown arrows appear next to the headings of each of our columns. We can click these arrows to open up the Filter Dialogue. which allows us to filter our data set so that it shows only certain rows. Below, weve used the Filter Dialogue to select only rows for which the Month is equal to February . When we press the OK button, our data set will be trimmed down: now, only February rows are shown. The beauty of filtering is that no rows have actually been deleted our entire original data set is preserved. Weve just temporarily filtered out rows in which the Month is equal to anything other than February. Notice the blue row labels on the left-hand side of the screen mdash those indicate that our data has been filtered. Now that you know how to use basic sorting and filtering, check out our more in-depth articles below. Theyll show you how to perform advanced custom sorts and add multiple filters based on dates, values, and text. Further reading How formulas work Formulas are the backbone of most advanced calculations within Excel. Think of a formula as an equation mdash its a series of steps that lead to a final output. You can tell Excel that youre entering a formula in Excel by starting your input with the equals sign ( ). For example, try entering the following into a cell: Since Excel sees the sign at the beginning of the line, it realizes that its being given a formula to calculate. It then sees 54 and adds the two numbers together, outputting a final value of 9 . Formulas often contain more than just numbers and operators like the sign. They can also contain one or more functions. Think of a function as a machine that helps you quickly and easily make calculations that would be difficult to perform by hand. Each function is like a recipe: it takes in a list of ingredients, and the recipe spits out something totally new mdash and, in most cases, more useful than what you put in. Each function is made up of three parts: First, a function name. which describes what the function does mdash like the name of a recipe. Function names are built into Excel. For example, there is a SUM function that adds together a series of values, and a AVERAGE function that averages together multiple values. Well explore the various functions available to you throughout these tutorials. Second, arguments. which combine within the function to output something bigger mdash like the ingredients of a recipe. For example, if we wanted to take the AVERAGE of 4 and 6. the arguments to the function would be the numbers four and six. In a function, arguments are separated by commas within parentheses. Third, output. which is what comes out of the function when its finished calculating mdash like the final product of a cooked recipe. For example, if we took the AVERAGE of 4 and 6. the output would be 5 . Take a look at the examples of completed formulae below. Can you identify the function names, arguments, and output Within formulae, we can also nest functions. Nesting functions means using the output of one function as the argument for another. For example, if we wanted to AVERAGE the numbers 4 and 6 and add the resulting value to the number 10 using SUM. we could do so by nesting functions like so: Notice that weve included the AVERAGE function within the SUM function, effectively nesting the two functions together. Whenever Excel encounters nested functions like these, it evaluates them starting on the inside and working out. For the sake of simplicity, throughout these tutorials, well evaluate nested functions step-by-step just like Excel does to show you every stage of the process, like so: Nesting isnt just limited to two layers mdash you can nest as many functions within each other as youd like. Take a look at the following formula mdash which we havent broken down step-by-step mdash and see if you can figure out why it outputs what it does. You now know the basics of how to use formulas and nested functions in Excel. Check out the tutorials below for more detailed information Further reading Save three hours of work a day with these 5 simple Excel hacks Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on how to automate your work using Excel. Why the TRUE and FALSE functions are so important. Why to rethink the way you do VLOOKUPs . Plus, well reveal why you shouldnt use PivotTables and what to use instead. Cell references Excel really starts to get insteresting when you start using cell references. Cell references are parts of a formula that connect to another cell or cell range within your worksheet. Take a look at the following formula, which contains the most basic type of cell reference: In this piece of code, were telling Excel to go to cell C4. evaluate it, and return whatever value it contains. Likewise, we could ask Excel to look at cell E6 and pull its value like so: Cell references are useful because they can be included within functions. This enables you to perform complex calculations based on sets of cells that would otherwise be difficult to perform manually. For example, take the following SUM function: This function will automatically SUM up all values in the entire range C3:C7 mdash in other words, cells C3. C4. C5. C6. and C7 . By default, cell references are relative. This means that they will change as we copy and paste them from cell to cell. Lets take a look at an example to clarify what this means. The following spreadsheet contains sales data for three product categories ( Cookies. Brownies. and Gummy Worms ), as well as a blank Total row. Weve inserted a SUM formula in the Total row to calculate total Cookies sales by summing cells C4:C6 : Our total is set for Cookies. but wed like to it to display for the other product categories as well. Lets copy the formula in cell C7 by pressing Ctrl C on Windows or 8984 C on a Mac. Then, well click and drag to select cells D7 and E7 and paste our formula using Ctrl V on Windows or 8984 V on a Mac. Notice what happens to the formula in cell D7 mdash it changes Our formula now references the cell range D4:D6 instead of C4:C6. This is the magic of relative cell references. As we copy and paste formulas from cell to cell, our references change to accomodate. Relative cell references are convenient, but there are some times during which we dont want our cell references to shift when we copy and paste. Consider the following sheet, in which weve created a static value in cell H4 to represent a tax amount taken off of our total sales: Our formula works in cell C8. but when we copy and paste it to the right, our relative cell references change and our formula breaks: Fortunately, theres a good solution to this problem: absolute cell references. Absolute cell references allow us to lock the row or column of a reference mdash or both mdash so that they do not change when we copy and paste from one cell to another. The symbol indicates an absolute cell reference. It can be used before the column letter, the row number, or both, and indicates that the given column letter or row number should not be changed when copying and pasting from cell to cell. Heres an updated version of our formula, with an absolute reference used to lock the column letter on the reference to our tax rate cell, H4 : Notice what happens when we copy and paste this formula to the right. Our H4 reference doesnt change, because the column letter is locked. Our formula now works for all cells into which were pasting it When working with absolute and relative cell references, its important to remember that you can use them on the row, column, or both. Heres a handy table to help understand what that symbol means when it appears: Both row and column will change as cell is copied and pasted. Remember, rows and columns in a cell range can also be locked. For example, the range A1:B8 will have its columns locked as it is copied and pasted. The range A1:B8 will lock its rows. Those are the basics of cell references mdash both relative and absolute. Check out the article below for more detailed information. Further reading Mathematical functions Now that weve covered the basics of Excel, its time to get into the programs more advanced features mdash starting with mathematical functions themselves. Excel has hundreds of functions available for use, and it would be impossible to cover all of them in this short tutorial. So, to start, well provide a brief overview of some of Excels most common mathematical functions. SUM is one of Excels simplest mdash and most-used mdash mathematical functions. It can take as many arguments as you want to give it, in the form of numbers, cell references, or cell ranges. Given these arguments as inputs, it outputs the SUM of all values provided mdash including each individual cell within a cell range. Heres a basic use of the SUM function, in which we add up a series of manually-entered numbers: Heres a slightly more complicated use of the SUM function, in which we add up a series of individual cells by specifying them as unique arguments to the function: And, finally, heres a better use of the SUM function, in which we use a cell range to add up the values in a series of contiguous cells: Check out our detailed SUM tutorial for even more details and information. The AVERAGE function works much like the SUM function: it takes as arguments a list of numbers or cell ranges. Unlike SUM it outputs the AVERAGE of the values provided. Heres a basic use of AVERAGE in action: And heres AVERAGE used with a cell range: The MAX function starts to get a little more complicated: given input arguments of numbers, cell references, or cell ranges, MAX finds the maximum individual value provided and outputs it. MAX is particularly useful when working with large quantities of data to determine high values within a set mdash like students highest score on a test or a daily high stock price. Take a look at the following formula, in which weve used MAX to find the maximum value within a series of individual numbers: Of course, like SUM and AVERAGE. MAX is most useful when applied to large ranges of cells. Consider the following example, in which a SnackWorld analyst uses MAX to find the highest dollar sales value out of a set of product categories for a given month: MAX has many applications, and as you get more and more comfortable with Excel, youre sure to find multiple uses for it within your spreadsheets. You can also use the closely-related MIN formula to find minimum values within a set. Check our our MAX and MIN tutorials for more. COUNT is another frequently-used function in Excel. Given a cell range or set of values, it counts the instances in which a number appears in the given range. Consider the following example: The above formula outputs 3. because there are three instances of numbers provided as arguments. A COUNT function provided with non-numerical inputs would not count them mdash it would only include the count of numbers provided as arguments: COUNT can also be used on a range of values like so: How is this useful in practice Use the COUNT function in your sheets to count data points, like number of test scores, number of items sold in a given period of time, and more. COUNT also has a sister function called COUNTA. which includes cells that contain text in its totals. Stop by our COUNT and COUNTA tutorial pages for more info. Further reading Lookup functions Now that weve got a handle on some of Excels basic mathematical functions, its time to move on to a more complicated class of tools: lookups. Lookup functions allow us to look up a given value on a table with multiple rows and columns dynamically. Thats quite a mouthful, so lets take a look at a real-world example to give you an idea what we mean. Take a look at the below spreadsheet, which lists SnackWorld unit sales and profit for various item categories in a given month. Lets say that a SnackWorld analyst wants to pull the Unit Sales number for the Lollipops category. She could just look it up on the table mdash but manually looking it up becomes infeasible if the table is too large mdash for example, if it contains hundreds or thousands of rows and columns. Its also time-consuming. What if we could create a tool in which we enter a category name, and the Unit Sales number for that category is automatically pulled from our input table We can accomplish the above using the VLOOKUP function. VLOOKUP takes a table and a lookup value as inputs, browses the given table for the lookup value in question, and finds whatever sits in a corresponding column number specified. Heres how it works: Given a set tablearray. VLOOKUP finds the given lookupvalue within that array, then moves over colindexnum columns to pull the corresponding data point. Take a look at the following use of VLOOKUP in action, in which we use the formula to pull the unit sales numbers for Lollipops : In the example above, we provide VLOOKUP with a lookup value, Lollipops. and a table to look in B2:D7. We also tell it that in the table specified, we want it to look 2 columns in for the data point, which corresponds to the Unit Sales column. When VLOOKUP finds the Lollipops value in our table B2:D7. it moves over 2 columns and pulls our unit sales number: 25,000,000. Weve just successfully created a simple lookup formula How is this useful in practice VLOOKUP can be used with cell references to create a dynamic data-pulling tool very quickly and easily. Take a look at the following example, in which weve used cells C9 and C10 to create dynamic input and output fields for a formula to pull profitability numbers: Notice that our VLOOKUP formula now references cell C9 instead of a hard-coded value like Lollipops. And when we change the text in C9 to another category name on our table, the formula in C10 automatically updates by pulling profitability numbers for the given category. Like magic, weve created a quick tool to pull data based on simple user inputs mdash all with one simple VLOOKUP formula Check out our in-depth VLOOKUP tutorial for more info on this powerful function. INDEX MATCH Once youve mastered VLOOKUP. its time to move on to an even more powerful lookup formula: INDEX MATCH. INDEX MATCH isnt actually a single function, but rather a combination of two separate Excel functions: INDEX and MATCH. We use it in place of VLOOKUP for almost all of our lookups, because it confers several important advantages: Counting isnt necessary. VLOOKUP forces you to count columns, providing it with a colindexnum to indicate which column to pull data from. INDEX MATCH allows you to skip this step, instead selecting the column in question directly. Inserting columns is easy. Since VLOOKUP uses a colindexnum for its lookup, inserting columns into your lookup table can often break your formulas. INDEX MATCH prevents these problems by eliminating the colindexnum argument. Backwards lookups are possible. INDEX MATCH allows you to look up values that are to the left of your item or category list, rather than only those that are to the right. Even more functionality. INDEX MATCH allows you to take advantage of a plethora of more advanced functionality mdash including both vertical and horizontal lookups two-dimensional lookups and lookups with more than one criteria. Covering how INDEX MATCH works is beyond the scope of this tutorial, but check out our complete guide to INDEX MATCH for more information and a full explanation. Further reading Save three hours of work a day with these 5 simple Excel hacks Work smarter, not harder. Sign up for our 5-day mini-course to receive must-learn lessons on how to automate your work using Excel. Why the TRUE and FALSE functions are so important. Why to rethink the way you do VLOOKUPs . Plus, well reveal why you shouldnt use PivotTables and what to use instead. Logical functions Logical functions are some of the most advanced formulas you can create in Excel. They allow us to tell Excel to choose one of various possible outputs depending on a condition that we specify. This functionality becomes incredibly useful when you want Excel to make decisions for you: for example, marking a test score as Passing if it is over 70 marking a salespersons quota as met if she has exceeded 20M in monthly sales or marking a stock as High-priority if its price drops below a certain limit. IF statements IF statements are the foundation of logical functions in Excel. IF statements look like this: When an IF statement runs, it first takes a look at the logicalexpression provided by the user. If the logicalexpression is a TRUE statement, the IF statement outputs valueiftrue otherwise, it outputs valueiffalse . Lets take a look at a very basic IF statement as a practical example: In the formula above, IF first evaluates its logicalexpression. 7lt3. Since this expression is FALSE. Excel ignores the valueiftrue argument and instead outputs the valueiffalse argument, Incorrect answer . Of course, the above example isnt particularly useful, because we dont need a complicated formula to tell us that 7 is not equal to 3. But IF becomes significantly more useful when we combine it with other functions mdash for example, SUM . In the following example, we use IF statements to dynamically provide output based on whether a salesperson met her sales quota for the first quarter of the year. The salespersons monthly sales are listed in a table we nest a SUM function inside an IF statement to total up the sales and compare it to a quota, which weve included in the formula via a cell reference. Lets break down whats happening in the above formula. First, our IF statement evaluates its logicalexpression. which asks whether the SUM of cells C3:C5 is greater than or equal to the value in cell F2. If it is, the sales quota is met and the formula outputs its valueiftrue. which is set as a cell reference to the text in cell F3. If not, the sales quota is not met and the formula outputs its valueiffalse. which is set as a cell reference to the text in cell F4. In this case, our sales quota is met, and the formula outputs a message of congratulations: Great job. But try lowering the values in cells C3:C5 so that their sum is below 20,000,000. Youll see that our message changes dynamically once our salesperson falls below quota. Those are the basics of IF statements, but you can do much more with them than just compare whether two values are equal to each other, or whether one is greater than the other. Check out the following list of logical operators in Excel for a full overview of how IF can be used to compare values or strings: Once youve got a handle on the IF statement, its time to move on to an even more useful Excel feature: SUMIF. This handy function allows us to take the SUM of every number in a range of values, provided that certain external criteria for those values are met. Lets take a look at a basic example of SUMIF in action to demonstrate. Consider the following spreadsheet, which lists SnackWorlds monthly sales by item type and product category. We already know how to use VLOOKUP and INDEX MATCH to dynamically pull the sales numbers for any individual Item. But what if we wanted to SUM up sales for every item within a given Category We can do this using the SUMIF function. Take a look at its syntax below: Given an input range of data points and a set criteria that we want those data points to fulfill, SUMIF will take the SUM of all numbers within a separately-provided sumrange. Heres a practical example of SUMIF used to solve our category problem above: In the above example, SUMIF takes a look at the range C3:C7 and evaluates each cell in that range based on its provided criteria. the value in the given cell is equal to the value in cell G4. Note the syntax weve used to tell Excel that we want to evaluate equality to cell G4. The sign, in quotes, the ampersand ( amp ), and then a reference to cell G4. This syntax might be confusing at first, but its just how SUMIF works note that we can replace that sign with any other logical operator, like lt or ltgt . After examining each cell in the range C3:C7. Excel adds the corresponding value in the range D3:D7 to a SUM total if and only if our criteria is true mdash in this case, if the Category is equal to the value in cell G4. Baked Goods. In this case, our final output is 11,000,000. because there were 11,000,000 total sales of Baked Goods in the data set provided. The best part about this formula is that its dynamic. Try changing the string in cell G4 from Baked Goods to Candy and watch as our category sales calculation automatically updates. The above may take a little time to digest, but walk through it a couple times and youll get a handle on how SUMIF works. If youre still having trouble, take a look at our in-depth SUMIF tutorial for more details and examples. Once youve mastered SUMIF. its also worth checking out our overview of SUMIFS. which is SUMIF s big brother. SUMIFS allows you to conditionally SUM values in a row based on multiple criteria rather than just a single criteria. Its also worth noting that SUM isnt the only function that has a conditional formula. COUNTIF works much the same way, but it COUNT s rows instead of SUM ming them. Further reading Creating charts Formulas and numbers arent all that Excel has to offer. In addition to displaying data numerically, its also excellent at displaying data visually using charts and graphs. In this section, well give you a brief overview of Excels charting capabilities, and show you how to generate graphs based off of your data. The most important first step to creating a chart is preparing your data. To generate a chart, youll need to create a data summary table that shows the exact data points that youd like to appear on your chart. Oftentimes, we create summary table for use with charts and graphs by leveraging the Excel functions we discussed above, including lookups, SUMIF. and COUNTIF. In the example below, weve consolidated a list of SnackWorld sales by category and month. Once your data is ready for charting, select your entire table by clicking and dragging your mouse, or using hotkeys ( Ctrl A using Windows or 8984 A on a Mac). Then, navigate to the Insert tab on the Ribbon, hit the Charts button, and select the type of chart you would like to create. In our example, well create a Clustered Column chart from our data. Our chart is created With just a few simple clicks, weve taken a data summary table and made it visually clear and accessible for our users. There are many different chart types available in Excel, so its important to think carefully about which visual will most clearly communicate your data. In the example below, weve used the same data to create a Stacked Column chart, which gives us a more useful look at total sales by month segmented by product category. Of course, the chart above is lacking some crucial details mdash for example, it doesnt have a title, so we have no idea what year our data comes from (or, for that matter, what companys sales data it represents). Once youve created your chart, ensure that your users have all the data they need by adding a title, axis labels, and other formatting, like a legend and data labels. All of these options are available when you select your chart and go to the Layout tab on the Ribbon: There are many complex charting options in Excel mdash including advanced features like manually-set axis labels, statistical analysis, and customized styling. Play around with the options in the Layout. Design. and Format tabs on the ribbon to familiarize yourself with the full range of Excels capabilities. Or, check out our in-depth article on charting for more information. Further reading Pivot Tables Once youve mastered Excels basic formulas mdash like SUM. SUMIF. IF statements, and VLOOKUP s mdash you should be able to perform some fairly complex analysis on your spreadsheets given enough time. But what if you need to perform calculations quickly and accurately under tight deadlines Oftentimes, writing formulas it too time-intensive and error-prone for real business applications, particularly when faced with time constraints. Fortunately, theres an easy alternative to complex formulas: Pivot Tables. Pivot Tables are a tool built into Excel that allows you to analyze large amounts of data quickly and accurately. Lets take a look at a Pivot Table in action to explain the concept. The spreadsheet below contains sales data for a number of SnackWorld orders in the first quarter of the year 2019. The data is in what we call flat file format. which means that it is broken down to its most granular level: each individual order is on its own line all relevant information (including the customer name, order date, quantity ordered, item, and total price) is broken out in each row and each column heading represents a distinct type of data (like Customer or Item ) rather than a data point (like January 2019 or February 2019 ). Making sure that our data is properly structured in flat file format is a critical first step in building a Pivot Table. For more information and specifics on flat file format, be sure to check out our article on how to make a Pivot Table . Once weve got our data in order, we can make our Pivot Table. Start by selecting any cell within the input data table then, head to the Insert tab on the Ribbon and select the PivotTable option: A Create PivotTable dialogue will appear. We can change some of these options when we get to more advanced Pivot Table training down the line, but for now feel free to leave everything as-is and click the OK button: A new sheet will appear that contains our Pivot Table. Notice that Excel has inserted a blank Pivot Table graphic on the left-hand side of the screen, and opened a new PivotTable Field List dialogue on the right: The PivotTable Field List contains a listing of all of the column headings within the data table we used as an input. We can add any of these column headings to the Report Filter. Column Labels. Row Labels. and Values sections below to generate different types of Pivot Table reports that segment our data different ways. Specifically: Report Filter allows us to filter our output based on the values in one or more fields. Column labels lets us summarize by a particular field across the top of the screen (columns). Row Labels lets us summarize by a particular field down the side of the screen (rows). Values Specifies the column data that wed like to summarize mdash for example, Total price . Thats all a lot to keep track of mdash so lets take a look at a real-life example to get a better handle on what this all means. Suppose that a SnackWorld analyst wants to summarize total sales by customer over the entire period contained within our data table. She could do so by dragging the Customer column to the Row Labels section mdash to indicate that we want each row of our Pivot Table to represent a unique customer mdash and the Total Price column to the Values section mdash to indicate that we want to sum up Total Price by customer. Move the field names around to different sections of the Pivot Table by clicking and dragging with your mouse. Without any formulas or functions, Excel has automatically added up the Total Price column for each of our customers. Weve created an accurate summary table quickly and easily with minimal effort based on a large input data set mdash thats the magic of Pivot Tables There are lots more things we can do with Pivot Tables by moving our columns between the four boxes at the bottom of the screen. For example, by dragging the Quantity column into the Values section alongside Total Price. we can sum both fields at once, segmented by customer. This view shows both total sales dollars and total quantity of goods ordered by customer: We can also drag another field mdash like Item mdash to the Column Labels section of the report to create a two-dimensional summary breaking out total sales by customer and item: Or, we can drag a field to the Report Filter section to filter our output table based on one or more criteria that we specify. In the following example, weve dragged the Item column to the Report Filter box to open up a dialogue that allows us to filter our output based on item type. The power of Pivot Tables is practically limitless mdash they can be used in a massive variety of situations to segment and summarize data. Theyre particularly valuable when calculating a SUM. COUNT. or AVERAGE across a large data set. For more detailed information about how to set up and use Pivot Tables, be sure to check out our in-depth explanation of Pivot Table features . Further reading Advanced formatting Now that youve got a handle on data manipulation in Excel, its time to learn some advanced formatting techniques to polish your spreadsheets mdash making them both beautiful to look at and easy to interpret. The most useful of these features is called Conditional Formatting. Its an Excel tool that allows you to format cells (i. e. change how they look) based on the values that they contain. For example, you could use Conditional Formatting to highlight all cells that contain values over a certain threshold or, you could use it to turn cells that contain larger numbers green and cells that contain smaller numbers red. Lets take a look at a common example of conditional formatting in practice to get a first-hand view of just how useful it is. Take a look at the below spreadsheet, prepared by a SnackWorld analyst. It shows the companys total monthly sales by product category for the year of 2019: The SnackWorld CEO, upon seeing this data, had an important comment: the information is all there, but its very hard to read the chart and identify trends without spending a significant amount of time looking at the numbers. Our analyst could create a chart or graph representing the data, but she wants to preserve it in table form so that exact sales numbers for each category and month can quickly be pulled. Is there an easy way that we could make this data easier to look at while preserving its integrity The answer is conditional formatting. Lets test it out by highlighting our data set mdash excluding the dates on the left-hand side of the chart, because we do not want to format those mdash and clicking the Conditional Formatting button on the Home tab of the Ribbon: A large formatting menu opens up giving us several options: Highlight Cells Rules allow us to highlight particular cells based on the values that they contain. We can specify criteria telling Excel to highlight cells that contain values greater than or less than a certain threshold between two numbers equal to a certain value or string containing a given substring and more. Top Bottom Rules allow us to highlight particular cells that are important relative to other values in our data set. For example, we could highlight the ten largest or smallest cells by value the top or bottom 10 of cells by value or cells containing values greater than or less than the data set average. Data Bars show values relative to the whole data set using a graph-type visual overlay. Color Scales change the background color of cells based on the values that those cells contain on a scale. Color scales use color gradients, with the highest-value cells appearing at one end of the gradient spectrum and the lowest-value cells appearing at the other end. For our analysts purposes, the Color Scales option will work the best to show our data. Lets select it and choose one of the color scales available. The first option, which well choose, highlights the highest-value cells in green, the middle value cells in yellow, and the lowest-value cells in red. When we select this color scale, Excel tints our cells on a spectrum, with the highest values in green and the lowest values in red. Note that the program automatically uses a gradient, making it very easy to tell where our data values fall in the range. To clear conditional formatting, select all formatted cells and look at the Clear Rules menu in the Conditional Formatting dialogue: Those are the basics of conditional formatting, but theres much more to learn. Check out our full conditional formatting tutorial for more information Further reading There you have it: the top ten places to start when youre learning how to use Excel. We hope that this tutorial has been helpful as you start off with this amazing and powerful program. Our website features dozens of free, easy-to-follow courses on how to use Excels formulas, functions, and other features, so be sure to check it out for more information as you learn. And if you have any questions or comments for us, wed love to hear them mdash sound off in the Comments section below. Thanks for coming by Please enable JavaScript to view comments.
No comments:
Post a Comment