Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fantastic Formulas with MrExcel Featuring Bill Jelen, MrExcel Tuesday, May 12, 2015.

Similar presentations


Presentation on theme: "Fantastic Formulas with MrExcel Featuring Bill Jelen, MrExcel Tuesday, May 12, 2015."— Presentation transcript:

1 Fantastic Formulas with MrExcel Featuring Bill Jelen, MrExcel Tuesday, May 12, 2015

2 Topics 1. Create ad-hoc totals to sum or count the visible rows after applying a Filter by Selection; 2. Create a formula to spear through worksheets (such as summing cell B5 from Sheet1 through Sheet31, or adding up cell B5 from every sheet that starts with Qtr); 3. Use the TRUE version of VLOOKUP; 4. Embed your lookup table right inside the VLOOKUP function; 5. Sort with a formula (using an example of showing the top three sales from an invoice data set); 6. Find the workdays between two dates, excluding Saturdays, Sundays and holidays; 7. Always return the value from a cell, no matter if someone inserts three new columns, or five new rows above the cell; 8. Add formulas to SmartArt business diagrams and change the boring static SmartArt diagrams into auto-calculating graphics; 9. Return the last entry in a row or column, no matter how many numbers have been entered; 10. Easily build VLOOKUP formulas that point to another worksheet or workbook; 11. Use INDIRECT, OFFSET and INDEX to point to variable ranges; and 12. Use SUMPRODUCT to sum every third row.

3 1. Ad-Hoc Totals After Filter by Selection Add Filter by Selection to Toolbar (See next) Insert 2 blank rows above data Filter by at least one column Go to first blank row below numbers and use AutoSum icon (∑) Resulting formulas will total only the visible values Cut the totals and paste to the top blank row

4 Filter by Selection Right-click the ribbon and choose Customize Quick Access Toolbar From the top left dropdown, choose All Commands. From the left listbox, scroll down to AutoFilter. Select AutoFilter. Click the >> button in the center of the screen. Click OK twice.

5 2. Spear through Worksheets To sum cell B4 on each worksheet from Jan through Dec Start on the Total worksheet in cell B4. Type =SUM(Jan:Dec!B4) and press Enter All of the worksheets between Jan and Dec are included in the total. Spaces in worksheet name? use: =SUM(‘Jan 10:Dec 10’!B4)

6 Sum All Worksheets Starting with Bill Type =SUM(‘Bill*’!B4) and press Enter. Miraculously, your formula changes to something like: =SUM(Bill_Jan!B4,Bill_Feb!B4)

7 3. When Would You Use TRUE version of VLOOKUP? 99% of people use the,FALSE version of VLOOKUP. What is the,TRUE version used for? In the picture above, 12835 is not found in the table. Need to use,TRUE to get closest lower value. See Notes on next slide

8 True VLOOKUP Notes Using,TRUE is the only time the lookup table has to be sorted. Sort it ascending. You can omit the,TRUE from the formula What if you need the next higher value? Use =MATCH() with -1 as the final argument.

9 4. Embed Lookup Table in Formula Edit the formula Select the characters in the formula bar that represent the lookup table: Press the F9 key to calculate that portion of the formula: Press Enter, Copy Down, You can Delete Lookup Table

10 5. Sort with Formula =MAX() will give you the largest value =MIN() will give you the smallest value =LARGE(, 2) will give you the 2 nd largest! =LARGE(,3) will give you the 3 rd largest Use =LARGE(B2:B13,ROW(A1)) for largest and copy down Find the matching name using VLOOKUP

11 6. Count Weekdays or Workdays =NETWORKDAYS(Start,End Date) will count Monday through Friday dates =NETWORKDAYS(Start,End Date,Range Containing Holidays) will not count any dates that are company holidays NETWORKDAYS.INTL to handle other work weeks. “0110001” is closed on Tues, Wed, Sun.

12 7. Always return the value from a cell, no matter if someone inserts three new columns, or five new rows above the cell Instead of =C4, use =INDIRECT(“C4”)

13 8. Add Formulas to SmartArt Create Static SmartArt with Approximately the Right Size Boxes using Dummy Text Convert SmartArt to Shapes (next slide) Select Shape that contains static text. Click in Formula Bar and type =C2 and press Enter. The formula above has to point to a single cell. If you need an additional calculation, enter that calculation in a new cell and point to that cell

14 Convert SmartArt to Shapes in 2010 Select the SmartArt. On the SmartArt Tools Design tab of the ribbon, choose Convert to Shapes

15 Editorial Comment SmartArt was invented by the PowerPoint team. It seems incredibly short-sighted that they didn’t use the 15-year-old feature in Excel to allow shapes to have text that comes from formulas. I pointed this out to the team at Microsoft and their response was the Convert to Shapes icon in Excel 2010…

16 9. Return Last Item in a Column or Row Use the,TRUE version of VLOOKUP, asking for a ridiculously large number (9999999999) or the last item alphabetically (“ZZZZZZZZZ”) When Excel can’t find a value smaller than what you are looking for, it returns the last item that it finds!

17 10. VLOOKUP to Another Worksheet Start to type the VLOOKUP formula: =VLOOKUP(A2, Use the mouse to navigate to the other worksheet or open workbook Use the mouse to select the range of the lookup table. Type a comma. Finish typing the formula 3,False) Excel will handle the confusing syntax of apostrophes and exclamation points

18 11. Use INDIRECT, OFFSET and INDEX to point to variable ranges INDIRECT lets you concatenate a cell reference and will return the value from that reference. INDEX returns a value from a certain row and column in a range OFFSET(Starting Cell, Rows Down, Columns Right, Rows Tall, Columns Wide)

19 12. Use SUMPRODUCT to sum every 3 rd row. Sum rows 5, 8, 11, …, 32 =MOD(ROW(),3) will return 2 for the desired rows =SUMPRODUCT((MOD(ROW(D4:D32),3)=2)*( D4:D32)) Alternatively: =SUMPRODUCT(--(MOD(ROW(D4:D32),3)=2),--(D4:D32))

20 SUMPRODUCT Notes {1;2;3} x {2;2;2} equals {2;4;6}, sum is 12 {True;False;True}x{1;2;3} returns 0 ! You need to convert the True to 1 and the False to 0. There are two popular ways: – Use Minus Minus before the array – Multiply the arrays in SumProduct

21 Follow Bill Jelen Twitter: MrExcel Linked In: Bill Jelen Facebook: Bill Jelen and/or MrExcel.com New Spreadsheet Tips Page at CFO.com MrExcel.com


Download ppt "Fantastic Formulas with MrExcel Featuring Bill Jelen, MrExcel Tuesday, May 12, 2015."

Similar presentations


Ads by Google