|
If statements
|
tarix | 12.08.2018 | ölçüsü | 12,12 Kb. | | #70077 |
|
EXCEL TRAINING!
-
IF STATEMENTS
-
=IF([formula],[value if true],[value if false])
-
=IF(D2<12,1,0) returns 1 if D2 is greater than 12, 0 if D2 is not greater than 12
-
If D2 is not a number, or equals 12, or is less than 12, the value will be zero
-
If D2 has an error, the output will also be an error
-
=SUMIF sums together numbers by matching cells to broader categories
-
=SUMIF(B:B,B2,C:C) outputs the sum of all values in column C where the value in column B is the same as B2
-
=C2/SUMIF(B:B,B2,C:C) tells us the percentage of the SUMIFed values from column C that cell C2 represents.
-
=AVERAGEIF gives the average for a specified category
-
=AVERAGEIF(B:B,B2,C:C) outputs the average for all values in column C where the value in column B is the same as B2
-
PIVOT TABLES
-
Pivot tables will change your life
-
To create: Select columns. Insert > Pivot Table
-
Use rows to tally up averages & counts
-
Rows = email, values = count of recipients
-
Add contrib_amt to the list of values
-
Adjust values metrics by clicking on item and using “Value Field Settings”
-
Change contrib_amt to average instead of count
-
Add a values column sum of contrib_amt
-
Use rows and columns to create crosstabs
-
Rows = email, columns = contrib_amt, values = count of recipients
-
Add additional data to the pivot table
-
Go back to pivot table, use Options > Change Data Source to add column F
-
Nested rows within a pivot table
-
Add Morning_Donation to rows
-
Move Morning_Donation higher in the heirarchy
-
Refresh data in a pivot table
-
Go back to main data sheet and alter Morning_Donation to have text values rather than binary values
-
Go back to pivot table, use Options > Refresh
-
Copy-pasting from a pivot table – generally best to use “paste as values”
-
Pivot charts – the new thing changing my life, and now yours
-
VLOOKUP
-
VLOOKUP will also change your life
-
You need four pieces of information for the VLOOKUP command
-
=VLOOKUP([1],[2],[3],[4])
-
The name of the cell you are using as a key (i.e. B2)
-
The table of cells you are looking things up in (i.e. A1:B4 – but make sure the first column matches your key)
-
The column number of the data you want to display
-
Whether you will accept close matches (TRUE) or only exact matches (FALSE)
-
=VLOOKUP(B2,'Subject Lines'!A1:B4,2,FALSE)
-
Watch out for shifting cell references!
-
Try these options instead
-
=VLOOKUP(B2,'Subject Lines'!$A$1:$B$4,2,FALSE)
-
=VLOOKUP(B2,'Subject Lines'!A:B,2,FALSE)
-
There is also HLOOKUP, which functions similarly but does a horizontal lookup instead of a vertical lookup.
-
What to do if you get the dreaded “#N/A”: use an IF and ISNA statements
-
=IF(ISNA(VLOOKUP(L2,Sheet2!L:L,1,FALSE)),0,VLOOKUP(L2,Sheet2!L:L,1,FALSE))
-
LEFT, RIGHT, CONCATENATE
-
Easy commands that help truncate & remix text
-
=LEFT(B2,6) will return the first six characters in cell B6
-
=RIGHT(B2,6) will return the last six characters in cell B6
-
=RIGHT(LEFT(B2,6),4) will return only the last four characters out of the first six characters of B2 – in other words, the characters in slots 3,4,5,6
-
=CONCATENATE(A2,D2) smashes the contents of those two cells together
-
=CONCATENATE(A2," - ",D2) returns A2 and C2 put together, but with spaces and a dash in between)
-
=CONCATENATE(A2," - ",LEFT(B2,6)) returns A2, a space and a dash, and the left six characters of B2
-
CONDITIONAL FORMATTING
-
Fun stuff to play around with, and makes your tables much easier to interpret
-
Found in the Home ribbon (Conditional Formatting button)
-
Favorites:
-
Color scales, shade according to each cell’s relative rank within a series
-
Greater than / less than / equal to
-
Above average
-
Conditional formatting can be especially useful when you have data that will change/update and you want to see particular values quickly and easily
-
Modify/delete rules with “Manage Rules” menu option
-
This is also how you rank rules, if the same cell has multiple rules
-
FILTER AND SORT
-
Select all columns in your dataset – if you leave columns out, they will get out of order relative to the other data
-
Use the Sort button in the Data ribbon to create tiered sorts
-
Alternatively, click Data > Filter
-
Click on the little arrows and sort by whatever column you like, or choose specific categories to display.
-
Caution: When data gets hidden, it doesn’t sort.
-
OTHER FUN FUNCTIONS & FORMULAS
-
Text to Columns
-
Splits text apart either using specific characters (like a space, a tab, a comma, etc) or delimited by length
-
LEN is the Length function, and returns the number of characters in a given cell
-
PERCENTRANK delivers the percentile of an individual value within an array.
-
=PERCENTRANK(C:C,C2) gives the percentile rank of C2 among all values in column C.
-
AVERAGE, MAX, MIN, MEDIAN, MODE
-
Pretty self-explanatory, these functions give you descriptive statistics for any range of cells you want
-
Name manager – give a particular block of cells a name so that you can keep referring to it, rather than
-
RAND delivers a random number between 0 and 1 – handy for picking a sample
-
Caution: random numbers will regenerate, so copy-paste-as-values
-
Pick a winner by generating a random number of all entrants and the going with the highest (or lowest)
-
CHARTS
-
In the Insert ribbon there is a section for adding various types of charts
-
Alternatively, use Pivot Charts!
-
Excel is sometimes bad at anticipating how you want to display your data
-
Figure out the types of charts you use the most and learn how to trick Excel into making them for you quickly.
-
Modify the displayed data by clicking into the chart and then changing the dimensions of the colored boxes that appear around your data
-
Change the formatting by right-clicking on any element of the chart and choosing “format [element name]”
-
Change the max/min and units of the axes using “format axis”
Dostları ilə paylaş: |
|
|