Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename unknown sheet name in excel.
I am getting a file wherein the name of the worksheet is not unique and i am
finding it dffficult to rename through program. Can anyone help me out to rename a worksheet which is named differently every time and normally only one worksheet is found in workbook. Thank you in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename unknown sheet name in excel.
Use the sheet index, not the sheet name.
So refer to the sheet as..... Sheets(1) -- Regards, Nigel "Vijay Kotian" wrote in message ... I am getting a file wherein the name of the worksheet is not unique and i am finding it dffficult to rename through program. Can anyone help me out to rename a worksheet which is named differently every time and normally only one worksheet is found in workbook. Thank you in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename unknown sheet name in excel.
I think the problem is not explained to you correctly.
I process the file based on file received by me from our customers. In the file, sheet is named differenly (depending upon client to client). Hence, i need some solution, wherein i can rename the sheet name to sheet1. In other words i would like to rename sheet to sheet1 (the original sheet name may be vijay or March or Wednesday etc). How to rename unknown sheet name through VBA program "Nigel" wrote: Use the sheet index, not the sheet name. So refer to the sheet as..... Sheets(1) -- Regards, Nigel "Vijay Kotian" wrote in message ... I am getting a file wherein the name of the worksheet is not unique and i am finding it dffficult to rename through program. Can anyone help me out to rename a worksheet which is named differently every time and normally only one worksheet is found in workbook. Thank you in advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename unknown sheet name in excel.
Dim CustomerWorkbook As Workbook
Dim Sheet As Worksheet Set CustomerWorkbook = Workbooks.Open("Customer Workbook.xls") ' if the workbook only has one sheet then rename it else search each sheet ' for some kind of identifying mark such as a page title, etc. If CustomerWorkbook.Worksheets.Count = 1 Then CustomerWorkbook.Worksheets(1).Name = "Sheet1" Else For Each Sheet In CustomerWorkbook.Worksheets If Sheet.Range("A1") = "Customer Data" Then Sheet.Name = "Sheet1" Exit For End If Next Sheet End If "Vijay Kotian" wrote: I think the problem is not explained to you correctly. I process the file based on file received by me from our customers. In the file, sheet is named differenly (depending upon client to client). Hence, i need some solution, wherein i can rename the sheet name to sheet1. In other words i would like to rename sheet to sheet1 (the original sheet name may be vijay or March or Wednesday etc). How to rename unknown sheet name through VBA program "Nigel" wrote: Use the sheet index, not the sheet name. So refer to the sheet as..... Sheets(1) -- Regards, Nigel "Vijay Kotian" wrote in message ... I am getting a file wherein the name of the worksheet is not unique and i am finding it dffficult to rename through program. Can anyone help me out to rename a worksheet which is named differently every time and normally only one worksheet is found in workbook. Thank you in advance |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename unknown sheet name in excel.
I am happy enough writing macros but want some help to ensure I can
write the one I want! I have a spreadsheet with pupil details in columns A-C, and then currently in columns D-AA I hold marking details for student progress. What I want to be able to do is each time a student's marks change, I want to place the date in a helper column for the date of the most recent change to the row. And what I really want is it to display (maybe in another column) "Today" if it has changed today, "Week" if it has changed in the last week, and "Month" if it has changed in the last month. If over a month, then "Warning" needs to be displayed. Any help gratefully received. Noz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do i rename a sheet if the rename tab is inactive? | Excel Worksheet Functions | |||
Importing from Excel sheet with unknown name | Excel Programming | |||
rename unknown named files | Excel Programming | |||
VBA to rename sheet WITHIN Excel | Excel Programming | |||
I cannot rename my excel sheet? | Excel Worksheet Functions |