INDEX + MATCH to match 2 columns, one is a merged cell?

Brojangels

New Member
Joined
Nov 8, 2016
Messages
11
I am trying to automate a process so that I can import a budget from QuickBooks and do less manual work in the future. The workbook would have 2 tabs, a "permanent" tab that is formatted the way I like, and most of the cells would be INDEX+MATCH lookups to the other tab; and the "import" tab (called QB) that would change on a monthly or some periodic basis.

I thought I had it figured out, because I got the January "budget" and "actual" columns to work, but when I copied it to February, the actual matched on both tabs but the "budget" numbers were referencing January on the QB tab.

Here's a general idea of the layout:
JanuaryFebruary
ActualBudgetActualBudget
1001
1002
1003

<tbody>
</tbody>

Currently my formula for "February Budget" is as follows:
{=INDEX(QB!$A$2:$CE$129,MATCH('Budget to Actual'!$C25,QB!$F$2:$F$129,0),MATCH(1,(QB!$2:$2='Budget to Actual'!L$2)*(QB!$3:$3='Budget to Actual'!L$3),0))}

F is the column on the QB tab with the account numbers,
J:N is the column range for "February" in row 2 (formulas are just using L)
L is the column on the "Budget to Actual" tab for "Budget" underneath the merged cell "February"

When I copy this formula to the "Budget" and "Actual" columns for additional months, again, the "Actual" matches QB correctly, but the "Budget" shows January's number in every month.

Any ideas???
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Un-merge the cells then highlight the cells and go to Format Cells -> Alignment -> Horizontal -> and use "Center Across Selection" instead.

igold
 
Upvote 0
Hmm... Well, that's a cool new formatting tool I just learned, but it is still not displaying the right result. Now instead of displaying January's Budget amount, it is saying #N/A in the other months' Budget columns. Any other ideas?
 
Upvote 0
To be honest, I did not look over your formulas. Have you checked those now that the cells are formatted in a more friendly manner.
 
Upvote 0
Yes, I checked the formulas to make sure they were referencing whatever cell actually contained "February" etc, regardless of where it appeared.

FWIW, I think the issue has something to do with the combination of referencing the "February" or whatever month cell, and also the cell that says "Budget" for each month. What I do not understand, though, is why the formula works for "Actual" every month, but "Budget" only displays January. I don't see why one would work and not the other.
 
Upvote 0
Replying because I am still scratching my head over this. Not sure if this will get re-bumped to the top for visibility, but any help is appreciated.
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,391
Members
449,445
Latest member
JJFabEngineering

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