I have a income statement that is broken into several similar sections as below:
Company 1
Revenue 1 $XXX
Expense 1 $YYY
Expense 2 $ZZZ
Company 2
Revenue 1 $XYX
Expense 1 $ZYZ
Expense 2 $XYY
Expense 3 $ZXX
and so forth with multiple more companies and expenses. Label are in column A and numbers are in column B.
The company names are unique but the lines below each of the companies are not unique and I need to look up expense 2 for company 2. For example the Label "expense 2" might appear 50 times in column A.
My first thought was to use vlookup on Company 2 and then offset to accomplish this but I will need this formula to work no mater the location of company 2 expense 2.
For example on one income statement company 2 could be in cell A25 and there could be no expense 1 and in the next income statement company 2 could be in cell A100 and there could be an expense 1. Therefore offset will not work b/c it is not consistent across all sheets. Also this will be a monthly summary exercise that I need a formula to automatically pull, so sorting or using advanced sort is not the preferred way.
Good news is that Company 2 and the expense I need to look up will always exist in column A and should be within 10 rows or so of Company 2.
Basically what I need to do is have a vlookup that finds Company 2 and then defines the range of a second vlookup, based on Company 2's location, of about 10 rows to look for the first time expense 2 appears below company 2.
Thank you for your help.
Rob
Bookmarks