Worksheet Consolidation

n0112388

New Member
Joined
Feb 18, 2013
Messages
2
Hi,

I am trying to consolidate monthly account information from several worksheets into a single summary worksheet. I defined names for the data in each worksheet (i.e. _BCC1, _BCC2, etc) and I created the following formula to work for the Jan column in my summary worksheet.

(=IFERROR(VLOOKUP(D17,_BCC1,2,0),0)+IFERROR(VLOOKUP(D17,_BCC2,2,0),0)+IFERROR(VLOOKUP(D17,_BCC3,2,0),0)+
IFERROR(VLOOKUP(D17,_BCC4,2,0),0)+IFERROR(VLOOKUP(D17,_BCC5,2,0),0)+IFERROR(VLOOKUP(D17,_BCC6,2,0),0)+IFERROR(VLOOKUP(D17,_BCC7,2,0),0)


Jan is column_index : 2 and now I want to drag across to replicate this formula for the other months but I don't want to manually change the column index reference to 3, 4, 5 and so on. I also want to note that the sheets do not contain the same number of accounts, so one account may not exist in a worksheet.

I think using some sort of sumif index/match combination could work but since I am just starting to learn about index/match I am looking for some help.

Thank you in advance!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
For the column count in your vlookup you can use the Column() function, which will return the column # of the current cell. So in your example you want column #2. Say that your formula is in cell A1. Column() would return '1', you want '2', so the formula would be Column() + 1

=Vlookup(D17, _BCC1, Column()+1,0)

**Important note: If you insert/delete columns from your summary worksheet you will throw these formulas off
 
Upvote 0
For the column count in your vlookup you can use the Column() function, which will return the column # of the current cell. So in your example you want column #2. Say that your formula is in cell A1. Column() would return '1', you want '2', so the formula would be Column() + 1

=Vlookup(D17, _BCC1, Column()+1,0)

**Important note: If you insert/delete columns from your summary worksheet you will throw these formulas off

@ChrisM- Thank you for the reply. I tried the column() and it works but you are right I can throw it my formulas off by adding /deleting columns and that concerns me since I will be sharing this workbook with my colleagues. Do you think there is a better way to do this?

thanks!
 
Upvote 0
I'm sure there is a better way out there, but one alternative is to use a hidden helper row, autofilled with numbers 1 thru xxx. then point your vlookup column # to the corresponding value in the hidden row.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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