acsishere
06-27-2008, 12:50 PM
Dear Friends,
I have a named range "Subcode" in my workbook (Sheet name Listsheet).
CODE / SUBJECT
000 / GENERALITIES
100 / PHILOSOPHY
200 / RELIGION
300 / SOCIAL SCIENCES
400 / LANGUAGES
500 / PURE SCIENCES
600 / APPLIED SCIENCES
I have 8000 data in (sheet name) "DATASHEET".
In ColA:
A3:A50 the values are "000". No other value is there.
A51:A100 the values are "100".
A101:A151 the values are "200". (means these are of a group, and ranges are having unique values only).
In ColB:ColAZ other related data is there.
I need a macro to do the following:
When I am to print a page of Groupcode 600, the macro should pick-up the value & it's Subject to show (like: 600: APPLIED SCIENCES) in the Header page of that particular page.
If I am to print all pages, then in every page the macro should show the value in loop (i.e. if ColA of printing page is "000" then the Header should show "000: GENERALITIES"; then, if ColA of printing page is "100" then the Header should show "100: PHILOSOPHY").
i.e. the header should Lookup the value from the Subcode range with ColA of Datasheet.
Any possibility? Your kind help is highly appreciated.
Thanks in advance.
acsishere.
I have a named range "Subcode" in my workbook (Sheet name Listsheet).
CODE / SUBJECT
000 / GENERALITIES
100 / PHILOSOPHY
200 / RELIGION
300 / SOCIAL SCIENCES
400 / LANGUAGES
500 / PURE SCIENCES
600 / APPLIED SCIENCES
I have 8000 data in (sheet name) "DATASHEET".
In ColA:
A3:A50 the values are "000". No other value is there.
A51:A100 the values are "100".
A101:A151 the values are "200". (means these are of a group, and ranges are having unique values only).
In ColB:ColAZ other related data is there.
I need a macro to do the following:
When I am to print a page of Groupcode 600, the macro should pick-up the value & it's Subject to show (like: 600: APPLIED SCIENCES) in the Header page of that particular page.
If I am to print all pages, then in every page the macro should show the value in loop (i.e. if ColA of printing page is "000" then the Header should show "000: GENERALITIES"; then, if ColA of printing page is "100" then the Header should show "100: PHILOSOPHY").
i.e. the header should Lookup the value from the Subcode range with ColA of Datasheet.
Any possibility? Your kind help is highly appreciated.
Thanks in advance.
acsishere.