Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Title pretty much says it all. I simply want to be able to have the contents of a cell entered as text in my header. For example I want my header to read "Part #1234". In cell D6 the actual part number "1234" is entered. Can I do this somehow? -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Do you mean a column header on a sprdsht? If yes a formula will do it:
using your example, ="Part #"&D6 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() No, I mean a page header. -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Everything I've read by searching this newsgroup
http://groups.google.com/group/micro...353db9c73db179 ....suggests this can only be done with VBA. This link gives an example. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You may use the workbook event "Before_print". This basic macro will
substitute whatever you have in the center header with the values of the range A1 on the active sheet: Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.CenterHeader = Range("A1").Value End Sub You can make it as complicate as you want, the event takes place even before the print preview, so you can see the results before printing. Hope this helps, Miguel. "bozrdang" wrote: No, I mean a page header. -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thanks guys! That does exactly what I asked, my only problem is that Since it's a header I need it to be a larger font size and bold. Not to mention that it was meant to be the 2nd line in 3 lines of text in the Header. Some brief searching seems to indicate you can't format text in VBA. My ultimate goal was something like this: * C o m p a n y N a m e * PART # 1234 WORK INSTRUCTIONS ::Page 1 of 2:: LOL, I must be a high maintenance Office user becasue I dabble a little bit in both Excel and Access and I invariably end up wanting to do something that seems relatively simple, but ends up being extremely difficult to achieve. ![]() -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Well, VBA may be able to do what you need. The best way of finding out is
recording a macro while you do all the formating that you want to do, and then look at the code that has been generated. In the line that sets the CenterHeader you may find the code you are looking for. Miguel. "bozrdang" wrote: Thanks guys! That does exactly what I asked, my only problem is that Since it's a header I need it to be a larger font size and bold. Not to mention that it was meant to be the 2nd line in 3 lines of text in the Header. Some brief searching seems to indicate you can't format text in VBA. My ultimate goal was something like this: * C o m p a n y N a m e * PART # 1234 WORK INSTRUCTIONS ::Page 1 of 2:: LOL, I must be a high maintenance Office user becasue I dabble a little bit in both Excel and Access and I invariably end up wanting to do something that seems relatively simple, but ends up being extremely difficult to achieve. ![]() -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Thanks a ton Miguel! I managed to get it to do exactly what I wanted doing that. I've never played with macros before and I've only played with VBA in Access so I didn't know you could do that. It's kinda like building a query in QBE in Access and then looking at the SQL code it creates. Very handy. I guess some posts I read elsewhere were incorrect about formatting text through VBA. At least in a header anyway. Thanks again Miguel and Dave! -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's a good way of saying it, I have also used QBE to take a look at the
SQL after :) I'm glad that it helped, Miguel. "bozrdang" wrote: Thanks a ton Miguel! I managed to get it to do exactly what I wanted doing that. I've never played with macros before and I've only played with VBA in Access so I didn't know you could do that. It's kinda like building a query in QBE in Access and then looking at the SQL code it creates. Very handy. I guess some posts I read elsewhere were incorrect about formatting text through VBA. At least in a header anyway. Thanks again Miguel and Dave! -- bozrdang ------------------------------------------------------------------------ bozrdang's Profile: http://www.excelforum.com/member.php...o&userid=34463 View this thread: http://www.excelforum.com/showthread...hreadid=542243 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it possible? | Excel Worksheet Functions | |||
assign formula to another cell | Excel Worksheet Functions | |||
How do I pull the column header next to a Max formula? | Excel Worksheet Functions | |||
Display result of formula in header? | Excel Discussion (Misc queries) | |||
"Unable to set the Formula property of the Series class" with a tw | Charts and Charting in Excel |