Вы находитесь на странице: 1из 7

What the if() - 6 different things you can do with excel if()

1. Sum Alternative Rows / Columns


# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Data value 67 77 69 57 82 86 34 40 90 77 55 98 68 34 25 99 55 47 95 65 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 Alt. Row Sum 1: 640 Alt. Row Sum 2: 680

Created by http://chandoo.org/wp - Point Haired Dilbert - Feel free to share / extend / mail / save / m

2. Count How Many Times Each Item on List A is Repeated in List B


List A Cities New York California Columbus Boston New Delhi Mumbai Chicago Washington # of Cust. 2 1 3 3 1 2 3 1 List B Customer City Gill Bates Columbus Beorge Gush Boston Yerry Jang Boston Parry Lage New Delhi Barren Wuffet New York Amil Anbani Mumbai Tatan Rata Washington Random Person 1 Columbus Another guy Columbus Bridget Jones Boston Pointy Haired Dilbert Mumbai Random Person 2 California Hollow Man Chicago Another Girl Chicago Cill Blinton Chicago Random Person 3 New York

3. Summarize Data with Countif and sumif

Summary City New York California Columbus Boston New Delhi Mumbai Chicago Washington Total Cust. 2 1 3 3 1 2 3 1 Total Sales $2,206 $38 $4,047 $1,936 $1,950 $2,223 $5,091 $1,207

M M M M M M M M

Avg. Sales per Cust. $1,103 M $38 M $1,349 M $645 M $1,950 M $1,111 M $1,697 M $1,207 M

4. Lookup 2nd / 3rd / 4th occurrence of an item in a list


Lookup Customer Smith Phone number 1st 320-966-4023 2nd 686-612-7782 3rd 132-716-5240 4th 185-813-8883 Customer Smith Smith Jason Albert Nancy Smith Grove Andy Jason Nancy Naancie Smith Andy Larry Page Larry Onemore Page Larry Smith Master Data CUST Smith1 Smith2 Jason1 Albert1 Nancy1 Smith3 Grove1 Andy1 Jason2 Nancy2 Naancie1 Smith4 Andy2 Larry1 Page1 Larry2 Onemore Page1 Larry3 Smith5

5. Avoid nested if()s; Use choose() instead


Student Ayan Barry Charles Dan Letter Grade B B E B Remarks Good Good Failed Good

Emma Fletcher Gary Harris Indy Jones Kamalini Larry Munroe

D D C C A D A B D

Poor Poor Acceptable Acceptable Excellent Poor Excellent Good Poor

6. Your favorite if() hack


Post your favorite hack in the comments section, show off to our readers what a data junkie you are http://chandoo.org/wp

n do with excel if() functions

share / extend / mail / save / modify as you like

d in List B

Revenue Data per Customer Customer City Gill Bates Columbus Beorge Gush Boston Yerry Jang Boston Parry Lage New Delhi Barren Wuffet New York Amil Anbani Mumbai Tatan Rata Washington Random Person 1 Columbus Another guy Columbus Bridget Jones Boston Pointy Haired Dilbert Mumbai Random Person 2 California Hollow Man Chicago Another Girl Chicago Cill Blinton Chicago Random Person 3 New York Sales $918 M $1,426 M $235 M $1,950 M $343 M $1,893 M $1,207 M $656 M $2,474 M $274 M $330 M $38 M $1,904 M $624 M $2,563 M $1,863 M

ster Data Phone number 320-966-4023 686-612-7782 122-617-7154 547-436-7376 956-633-7322 132-716-5240 340-267-0529 531-413-4718 613-228-4294 272-525-2042 474-163-1656 185-813-8883 591-797-3970 310-348-2518 131-551-5332 297-487-5253 431-384-0125 771-133-2877 304-024-4046

rs what a data junkie you are

Вам также может понравиться