• Status: Solved
• Priority: Medium
• Security: Public
• Views: 259

Comparing two Excel Fields (matching)

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
Patrick O'Dea
• 2
• 2
1 Solution

Commented:
No example sheet attached...
0

Author Commented:
See attached !

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

Commented:
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 Commented:
Perfect!  (I used the VLookup solution)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.