Solved

Comparing two Excel Fields (matching)

Posted on 2013-05-13
4
238 Views
Last Modified: 2013-05-13
Hi,

I am doing a small excel project for a HOTEL.  This is simpler that it sounds.  Look at the sheet.

The manager wants to know what his projected ROOM sales are for the coming months.

Eg. See attached where
the projected sales for August are 41 as at May 1st
the projected sales for August are 45 as at May 8th

NOTE : For reasons I will NOT go into,  the months will be displayed in RANDOM sequences on the sheet.

WHAT I WANT!

See yellow highlights on sheet - headed "Difference".

I want a formula in column "K" which takes the month in Column "F" (August, value 45) and subtracts the corresponding value in Column "B".  (e.g. 45-41=4)

(I have tried VLookup to no avail).
0
Comment
Question by:Patrick O'Dea
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:NBVC
ID: 39162499
No example sheet attached...
0
 

Author Comment

by:Patrick O'Dea
ID: 39162505
See attached !

(I forgot this in the original!)
HotelEE.xlsx
0
 
LVL 23

Accepted Solution

by:
NBVC earned 500 total points
ID: 39162528
Try:

=VLOOKUP(J4,$F$4:$G$7,2,0)-VLOOKUP(J4,$B$4:$C$7,2,0)

or

=SUMIF($F$4:$F$7,J4,$G$4:$G$7)-SUMIF($B$4:$B$7,J4,$C$4:$C$7)
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 39162540
Perfect!  (I used the VLookup solution)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question