PC Review


Reply
Thread Tools Rate Thread

Cell contents in header/footer

 
 
mdavison
Guest
Posts: n/a
 
      9th Oct 2006
I'm sorry but I can't find the original thread, so I am posting to both
groups.

Someone asked how to display the contents of a cell in the header or footer
and someone else gave the code. works great! Thanks.
One issue: I am trying to use this in an overtime form, saved as an XLS in
Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
Novell/Win XP/Office 03/Interwoven environment.

I have users entering their employee ID number, which looks up their
concatenated name & department for display. But it also adds a special
department in a field which is formatted with white text so users wont freak
out and THAT is where the code in my header is supposed to pull the
reference from. IE: The cell contents are volatile. But now, every single
user's printout show MY department code in the header instead of the one
that matches their own lookup.
Is there some sort of fresh code that I need?

Please help! Thanks,
-Monica


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SkxhdGhhbQ==?=
Guest
Posts: n/a
 
      9th Oct 2006
It would help if you posted the formula used to get the information. I
suspect that the formula contains a specific reference to the workbook you
used to set it up initially. That reference needs to be taken out of the
formula (if I'm right) so that it doesn't try to reference or link to your
workbook.

Check and see if you have links in any of the workbooks you created for
others: Edit | Links - and if this is the case, you'll see reference to link
to (your original) workbook.

"mdavison" wrote:

> I'm sorry but I can't find the original thread, so I am posting to both
> groups.
>
> Someone asked how to display the contents of a cell in the header or footer
> and someone else gave the code. works great! Thanks.
> One issue: I am trying to use this in an overtime form, saved as an XLS in
> Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
> Novell/Win XP/Office 03/Interwoven environment.
>
> I have users entering their employee ID number, which looks up their
> concatenated name & department for display. But it also adds a special
> department in a field which is formatted with white text so users wont freak
> out and THAT is where the code in my header is supposed to pull the
> reference from. IE: The cell contents are volatile. But now, every single
> user's printout show MY department code in the header instead of the one
> that matches their own lookup.
> Is there some sort of fresh code that I need?
>
> Please help! Thanks,
> -Monica
>
>
>

 
Reply With Quote
 
mdavison
Guest
Posts: n/a
 
      9th Oct 2006
Its not a formula - its code. And I think I did it correctly the way the
original respondent posted it. Right?

'ThisWorkbook
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
..LeftHeader = Range("G3")
..CenterHeader = ""
..RightHeader = ""
End With
End Sub


"mdavison" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm sorry but I can't find the original thread, so I am posting to both
> groups.
>
> Someone asked how to display the contents of a cell in the header or

footer
> and someone else gave the code. works great! Thanks.
> One issue: I am trying to use this in an overtime form, saved as an XLS in
> Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
> Novell/Win XP/Office 03/Interwoven environment.
>
> I have users entering their employee ID number, which looks up their
> concatenated name & department for display. But it also adds a special
> department in a field which is formatted with white text so users wont

freak
> out and THAT is where the code in my header is supposed to pull the
> reference from. IE: The cell contents are volatile. But now, every single
> user's printout show MY department code in the header instead of the one
> that matches their own lookup.
> Is there some sort of fresh code that I need?
>
> Please help! Thanks,
> -Monica
>
>



 
Reply With Quote
 
=?Utf-8?B?SkxhdGhhbQ==?=
Guest
Posts: n/a
 
      9th Oct 2006
Since the default value of a range is its .Value you should be getting what
is displayed in G3 at the time. Probably need to either call someone up
that's having the issue and asking them what's showing in G3 on the sheet
while they have the file open - or walk down the hall and peek over their
shoulder to see for yourself.

To be more specific you could change the .LeftHeader = Range("G3") statement
to either
..LeftHeader = Range("G3").Value
or
..LeftHeader = Range("G3").Text

although in theory all three should give you pretty much the same results in
this case.

"mdavison" wrote:

> Its not a formula - its code. And I think I did it correctly the way the
> original respondent posted it. Right?
>
> 'ThisWorkbook
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> With ActiveSheet.PageSetup
> ..LeftHeader = Range("G3")
> ..CenterHeader = ""
> ..RightHeader = ""
> End With
> End Sub
>
>
> "mdavison" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I'm sorry but I can't find the original thread, so I am posting to both
> > groups.
> >
> > Someone asked how to display the contents of a cell in the header or

> footer
> > and someone else gave the code. works great! Thanks.
> > One issue: I am trying to use this in an overtime form, saved as an XLS in
> > Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
> > Novell/Win XP/Office 03/Interwoven environment.
> >
> > I have users entering their employee ID number, which looks up their
> > concatenated name & department for display. But it also adds a special
> > department in a field which is formatted with white text so users wont

> freak
> > out and THAT is where the code in my header is supposed to pull the
> > reference from. IE: The cell contents are volatile. But now, every single
> > user's printout show MY department code in the header instead of the one
> > that matches their own lookup.
> > Is there some sort of fresh code that I need?
> >
> > Please help! Thanks,
> > -Monica
> >
> >

>
>
>

 
Reply With Quote
 
mdavison
Guest
Posts: n/a
 
      20th Oct 2006
Here is the formula used to look up the data - it works perfectly well.

=IF($B$3=0,0,LOOKUP($B$3,Sheet2!$A$2:$A$175,Sheet2!$G2:G$175))

Hereis the code I got from a previous post to add the above cell contents
into the left header. Its also works - but not 100% of the time.

'ThisWorkbook
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
..LeftHeader = Range("G3")
..CenterHeader = ""
..RightHeader = ""
End With
End Sub

Thanks all.


"JLatham" <HelpFrom @ Jlathamsite.com.(removethis)> wrote in message
news:A4C05903-9579-447A-B042-(E-Mail Removed)...
> It would help if you posted the formula used to get the information. I
> suspect that the formula contains a specific reference to the workbook you
> used to set it up initially. That reference needs to be taken out of the
> formula (if I'm right) so that it doesn't try to reference or link to your
> workbook.
>
> Check and see if you have links in any of the workbooks you created for
> others: Edit | Links - and if this is the case, you'll see reference to

link
> to (your original) workbook.
>
> "mdavison" wrote:
>
> > I'm sorry but I can't find the original thread, so I am posting to both
> > groups.
> >
> > Someone asked how to display the contents of a cell in the header or

footer
> > and someone else gave the code. works great! Thanks.
> > One issue: I am trying to use this in an overtime form, saved as an XLS

in
> > Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
> > Novell/Win XP/Office 03/Interwoven environment.
> >
> > I have users entering their employee ID number, which looks up their
> > concatenated name & department for display. But it also adds a special
> > department in a field which is formatted with white text so users wont

freak
> > out and THAT is where the code in my header is supposed to pull the
> > reference from. IE: The cell contents are volatile. But now, every

single
> > user's printout show MY department code in the header instead of the one
> > that matches their own lookup.
> > Is there some sort of fresh code that I need?
> >
> > Please help! Thanks,
> > -Monica
> >
> >
> >



 
Reply With Quote
 
mdavison
Guest
Posts: n/a
 
      23rd Oct 2006
I posted the formula and the Macro code. No links are involved. We use
WorkSite which makes linking from one file to another a royal pain anyway.
So I was pretty sure it was not an issue, but I DID check to be sure.
Typically, my spreadsheets are self-contained.
Thanks.

"JLatham" <HelpFrom @ Jlathamsite.com.(removethis)> wrote in message
news:A4C05903-9579-447A-B042-(E-Mail Removed)...
> It would help if you posted the formula used to get the information. I
> suspect that the formula contains a specific reference to the workbook you
> used to set it up initially. That reference needs to be taken out of the
> formula (if I'm right) so that it doesn't try to reference or link to your
> workbook.
>
> Check and see if you have links in any of the workbooks you created for
> others: Edit | Links - and if this is the case, you'll see reference to

link
> to (your original) workbook.
>
> "mdavison" wrote:
>
> > I'm sorry but I can't find the original thread, so I am posting to both
> > groups.
> >
> > Someone asked how to display the contents of a cell in the header or

footer
> > and someone else gave the code. works great! Thanks.
> > One issue: I am trying to use this in an overtime form, saved as an XLS

in
> > Read Only format in MailSite v.8.0 SP1. Can't use it as an XLT in our
> > Novell/Win XP/Office 03/Interwoven environment.
> >
> > I have users entering their employee ID number, which looks up their
> > concatenated name & department for display. But it also adds a special
> > department in a field which is formatted with white text so users wont

freak
> > out and THAT is where the code in my header is supposed to pull the
> > reference from. IE: The cell contents are volatile. But now, every

single
> > user's printout show MY department code in the header instead of the one
> > that matches their own lookup.
> > Is there some sort of fresh code that I need?
> >
> > Please help! Thanks,
> > -Monica
> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell contents in header/footer mdavison Microsoft Excel Worksheet Functions 5 23rd Oct 2006 08:18 PM
Display cell contents in the Header or Footer? =?Utf-8?B?eW9zdDQy?= Microsoft Excel Misc 1 28th Dec 2005 02:59 PM
Insert cell contents into header/footer =?Utf-8?B?am9lZW5n?= Microsoft Excel Misc 7 21st Jul 2005 11:01 PM
Can contents of a cell be used in header/footer? Anon Ymous Microsoft Excel Discussion 6 15th Jun 2004 12:09 AM
Cell Contents in Header/Footer? Aerial Microsoft Excel Misc 1 25th Sep 2003 09:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:07 PM.