hello,
I have a workbook 13,272 lines long. In one of the columns is the division field in the format "XX XX XX" where the x's are numbers and there is a space between each pair. In the next column is the description of what that section of data is for. For example:
What I would like to do is create a Table of Contents page that can automatically pull each sequential division and the related description. I would do a backflip if I can also have the page # in which that division is calculated in a separate column.
I have tried to do a VLOOKUP but run into problems in how to skip the blanks and unrelated formats.
This is what I have: =VLOOKUP((IF(OR(DIVISION="",LEN(DIVISION)=4),"",DIVISION)),TOC,2,FALSE)
Where DIVISION and TOC are defined names. What happens is that the IF function is passing the description instead of going to the next cell to check the format to pull.
Please also if anyone knows how to pull the printed page number lmk- I have seen a few VB's that have been posted but I can't seem to tweek them rightly and I'm pretty VB blind.
Any thoughts or help would be much appreciated.
Thanks.
I have a workbook 13,272 lines long. In one of the columns is the division field in the format "XX XX XX" where the x's are numbers and there is a space between each pair. In the next column is the description of what that section of data is for. For example:
DIVISION DESCRIPTION
33 75 00 HIGH-VOLTAGE SWITCHGEAR AND PROTECTION DEVICES:
Unfortunately there are duplicates in the Division column such that there can be more than one "33 75 00" however in each of those cases I only need the first description. Also there are blanks and number of different formats (such as "XXXX") but I only need to look at the ones in the above format.33 75 00 HIGH-VOLTAGE SWITCHGEAR AND PROTECTION DEVICES:
What I would like to do is create a Table of Contents page that can automatically pull each sequential division and the related description. I would do a backflip if I can also have the page # in which that division is calculated in a separate column.
I have tried to do a VLOOKUP but run into problems in how to skip the blanks and unrelated formats.
This is what I have: =VLOOKUP((IF(OR(DIVISION="",LEN(DIVISION)=4),"",DIVISION)),TOC,2,FALSE)
Where DIVISION and TOC are defined names. What happens is that the IF function is passing the description instead of going to the next cell to check the format to pull.
Please also if anyone knows how to pull the printed page number lmk- I have seen a few VB's that have been posted but I can't seem to tweek them rightly and I'm pretty VB blind.
Any thoughts or help would be much appreciated.
Thanks.
Last edited: