At the Intersection of Speed and Excellence
Figart Consulting

NIFTY TIP #5: Adding or Subtracting Amounts from Different Ranges

Problem: You need to add or subtract amounts from different ranges (SUMIF function).

Solution: Insert two SUMIF formulas and combine them into a single formula:

  1. Insert the SUMIF formula to total the amounts based on the criterion 701 into cell E2.
  2. Insert the SUMIF formula to total the amounts based on the criterion 300 into cell E3.
  3. Select cell E2 and copy the formula from the Formula Bar, select the formula and press <ctrl>+C and click the Enter or Cancel symbol in the Formula Bar to exit Edit mode.
  4. Select cell E5 and press <ctrl>+V.
  5. Select cell E3 and copy the formula from the Formula Bar without the equals (=) sign by selecting the formula and pressing <ctrl>+C.
  6. Select cell E5 and enter a minus(-) sign after the formula in the cell, and then press <ctrl>+V.

The combined formula is now:

=SUMIF(A:A,D2,B:B)-SUMIF(A:A,D3,B:B)

Nifty Tip #4: Organizing the Data Table for Proper Use of the VLOOKUP Formula

The VLOOKUP formula searches for the lookup criteria in the leftmost column of the data table.  It is recommended that the whole sheet be used as the data table, so that the VLOOKUP will automatically look at column A as the leftmost column.  Defining a Name for the sheet (to use it as the Table_array, the second argument in the VLOOKUP formula) will eliminate the need of updating the range reference in any VLOOKUP formula.

To define a Name for the sheet:

  1. Select a cell and click Select All (the button a the top left corner of the intersection between rows and columns).

OR

Press <ctrl>+A (In Excel 2003, press <ctrl>+A+A when selecting a cell in a region).

  1. Press <ctrl>+F3, and in the Names workbook box, type the name for the data table.
  2. Click OK.

Nifty Tip #3: CONCATENATE

A couple of the last Nifty Tips we’ve talked about were about splitting combined cells.

That’s great, and it’s often useful, but what if you want to combine the contents of a cell? Maybe you’re writing a letter or sending an invoice, and it would just be easier to have someone’s name be in one cell to export, or you want to add a salutation.

It’s easy!

The CONCATENATE formula allows one to combine text from multiple cells into a single cell.  The CONCATENATE formula is in the Text category in the Insert Function dialog box.

To add a blank character between words, press Spacebar in the second and fourth argument box.  The space between quotation marks adds a blank character between the separated texts.   Notice in this case, a colon was added in the second argument, creating a colon and a space after “F1” before adding the contents of A2.  Whatever is between the quotes, be it a space, text or characters, it will show up in the concatenation.

Nifty Tip #2: Combining the VLOOKUP and MATCH formulas

The VLOOKUP formula returns data from any column you choose in the data table.  All you have to do is change the number of the column in the third argument, right?

Well, it sounds easy, but there is a little catch.

  • How can you determine the number of a column in a data table that contains numerous columns?
  • How can you easily change the number of the column in the third argument of the VLOOKUP formula?
  • How can you easily change the column number in multiple formulas in a worksheet from which complex reports are prepared or in a sheet that contains multiple VLOOKUP formulas?

Solution:

Insert the MATCH formula in the third argument of the VLOOKUP formula.

Step One:  Define Two Names

  1. Select Row 1, press <ctrl>+F3 (That’s the F3 function key at the top of your keyboard.  It opens the Name Manager).
  2. Type the name Row1 in the Names in workbook field, and click OK.
  3. Select the data table by pressing <ctrl>+*.  Then open the Name Manager again by pressing <ctrl>+F3, and enter Data in the Names in the workbook field, then click OK.

Step Two: Enter the Match Formula

  1. Open an adjacent worksheet, and select cell A1
  2. In cell A1, type 4/01/2001
  3. In cell B1, enter the formula =MATCH(A1, Row1, 0)  Hint: Be careful to enter the value 0 in the third argument to specify the search for an exact value.
  4. Results of calculation: 7.

Step Three: Enter the Vlookup formula

  1. Enter the account number 201 into the cell A2
  2. Enter the formula =VLOOKUP(A2, Data, B1) in cell B2.  In the third argument of the VLOOKUP formula, select a cell which contains the MATCH formula.
  3. Calculation results: 7981.

Step Four: Combine the Formulas

  1. In the formula bar (MATCH formula) of cell B1, select the formula without the = sign, press <ctrl>+c, and click the Cancel sign (from the left of the formula in the formula bar).  Select cell B2, and in the formula bar, select the address B1.
  2. Press <ctrl>+v and press Enter.
  3. The final result, a nested formula is:

=VLOOKUP(A2, Data, MATCH(A1,Row1,0))

Figart Consulting’s Excel Nifty Tip #1.5

NIFTY TIP # 1.5: Splitting a Full Name into Two Separate Cells

Problem: You have inherited a mailing list with hundreds of names.  You’ll need to be able to sort the list alphabetically and you notice that the individuals’ first and last names are together in the same cell.   Your blood pressure rises as you think you might have to do a tedious cut and paste job on this silly list, and wonder if  you have the time to do the job.

Solution:

No fear.  You have the time, because you have this little Nifty Tip.

To retrieve the first name, use the LEFT and FIND functions as shown in the following formula:

=LEFT(A2,FIND(“ “,A2))

To retrieve the last name use the RIGHT, LEN and FIND functions as shown in the following formula:

=RIGHT(A2,LEN(A2) –FIND(“ “,A2))

Huzzah.  Your boss thinks you’re a genius and you’ve saved the day.