I'm downloading a spreadsheet with several years of financial information. Each financial statement is broken out into its own sheet (Income statement, Balance sheet, etc). Each sheet is broken out by year (each column), with financial numbers below.
I created a new sheet, and am working on a VLOOKUP format to pull out the specific information I need from each sheet. Example:
=VLOOKUP($A3,'Balance Sheet'!$A$13:$J$95,2,)
This VLOOKUP matches the line-item wording on my column (such as "Cash"), then returns the corresponding number for a given year in another sheet.
A few issues:
1) Is there a way to automatically change the table array size in my vlookup? The number of columns in each sheet can be variable (anywhere from 3-10 years), and the number of row items could be very wide (from 50-150). How do I make sure that I capture the correct array in an automated fashion?
1a) Is there a way to auto-detect how many columns of data are included in each sheet? I'd like to build my template sheet for a set number of years, but sometimes I get fewer years of info..If possible, I need it to line up to the right automatically (not the left). So if my sheet is, with spots for data below:
1 2 3 4 5
And I get 3 years of historical, I need it to show up as:
1 2 3 4 5
- - X X X
Not
1 2 3 4 5
X X X - -
2) Is there a way for VLOOKUP to ignore spaces when matching in another sheet?
3) Is there a way (macro?) to auto-create a sheet with all of this info/formulas plugged in?
Thanks!
Bookmarks