Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
HELLO,
I have a question for you guys...I have a worksheet with 12 Sheets: A; B; C; .....K;L. I would like to record a macro in VBA wich alows me to put in each Sheet a Header like: Department A for Sheet A, Departement B for Sheet B, etc; Is this possibile? Please, please help me...I tried all day long ! Thanks -- Dragos |
#2
![]() |
|||
|
|||
![]()
Assuming you wanted the header in Cell A1:
Sub NameThem() Dim i As Integer For i = 1 To Sheets.Count Sheets(i).Range("A1").Value = "Department " & Sheets(i).Name Next i End Sub Hope this helps Rowan Dragos wrote: HELLO, I have a question for you guys...I have a worksheet with 12 Sheets: A; B; C; ....K;L. I would like to record a macro in VBA wich alows me to put in each Sheet a Header like: Department A for Sheet A, Departement B for Sheet B, etc; Is this possibile? Please, please help me...I tried all day long ! Thanks |
#3
![]() |
|||
|
|||
![]()
Yes, this helps a lot!! it works...Thank you !!! ;-))
-- Dragos "Rowan" wrote: Assuming you wanted the header in Cell A1: Sub NameThem() Dim i As Integer For i = 1 To Sheets.Count Sheets(i).Range("A1").Value = "Department " & Sheets(i).Name Next i End Sub Hope this helps Rowan Dragos wrote: HELLO, I have a question for you guys...I have a worksheet with 12 Sheets: A; B; C; ....K;L. I would like to record a macro in VBA wich alows me to put in each Sheet a Header like: Department A for Sheet A, Departement B for Sheet B, etc; Is this possibile? Please, please help me...I tried all day long ! Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro for Protecting a Sheet | Excel Discussion (Misc queries) | |||
is there anyway in an excel macro to reorder the sheet tabs from left to right? | Excel Worksheet Functions | |||
macro to copy columns to sheet | Excel Discussion (Misc queries) | |||
MACRO - copy rows based on value in column to another sheet | Excel Discussion (Misc queries) | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |