Comparative formula

Pizzio

Active Member
Joined
Apr 28, 2005
Messages
275
I'm trying to create a formula that gives me the $ variance between two columns. The problem i'm having is i want it to change month over month based on a date driver in Cell A1. I also need it to SUM the data in column C by sub-category. So if it's March I need my formula to sum all 'base rent' for the month of march. March would be identified in cell A1.
West WD3 budget vs actual - January 09.xls
CDEFGH
26FINALSubCategory2009.Jan2009.Feb2009.Mar2009.Apr2009.May
27BaseRent40,000
2840,000----
29BuildingExpense500,000
West
 
Yes but i have the formula on a seperate tab than the source data. Maybe that's creating an issue.

You just need to prefix the ranges with the name of the sheet where they are like in Sheet1!$A$2:$A7...

BTW, are you opting for an expensive formula?
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I believe i found the issue. When attempting to capture the entire year the formula creates a #VALUE but if i break it down so that it just captures through September then it returns with the correct value. Is there a way to correct this?
 
Upvote 0
One last question. I've now been ask to add in the city data. Grrr! Is there a way to add in a second driver?
 
Upvote 0
I believe i found the issue. When attempting to capture the entire year the formula creates a #VALUE but if i break it down so that it just captures through September then it returns with the correct value. Is there a way to correct this?

The formula works fine for me. Make sure your edit your ranges properly.
 
Upvote 0
One last question. I've now been ask to add in the city data. Grrr! Is there a way to add in a second driver?

I guess you can. It will get a bit more complicated. Also have you considered using a pivot table?
 
Upvote 0
One last question. I've now been ask to add in the city data. Grrr! Is there a way to add in a second driver?

Do you mean something like sum for Stamps (a category) between say 1-Feb-09, first driver date and 1-Apr-09, second driver date? If so:

Control+shift+enter, not just enter:

=SUM(IF($A$4:$A$10=D$1,IF($B$3:$G$3>=B$1,IF($B$3:$G$3<=C$1,$B$4:$G$10))))

where D1 houses the category of Stamps, B1 1-Feb-09, and C1 1-Apr-09.
 
Upvote 0
The formula worked perfectly! Thank you to all who helped with this. Who knows what my manager will come up with next. >.<
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,790
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top