Naming New Tab Without Knowing Its Name
Feb 16, 2012
Is there a way to name a new tab without knowing its name. For instance, when I create a new tab, it could be named "Sheet2" or "Sheet3", but there is sometimes no way to know. Is there a way to edit the name of that new tab without refering to it by name?
View 1 Replies
ADVERTISEMENT
Feb 19, 2010
My date of birth is 09/08/1970.I want to know that as on today,which years,months and days I have passed?
View 3 Replies
View Related
Jun 26, 2007
I have a master workbook, meeting1.xls which is used on a daily basis. All of the macros saved in this workbook naturally refer to Windows("Meeting1.xls").Activate.
However, I want to be able to open Meeting1.xls save it as a new name (for today's details) and then populate it.....as well as have the Macros pick up that new file name (rather than always looking for Meeting1.xls.)
I've tried saving Meeting1 as a template file and that didn't seem to work either. When I save it as a new name, the macro always searches for the original name.
View 9 Replies
View Related
Mar 20, 2009
I currently have a macro setup that puts Auto-Sum data in the row below the bottom-most row of data. What code would I need to format this Auto-Sum row with the following parameters automatically...
1. Merge & center F & G in the Auto-Sum row with the text "Totals".
2. Change the row height of the Auto-Sum row to 44 pixels.
3. Center the vertical alignment of the Auto-Sum row.
4. Put the thickest border around the Auto-Sum row in cells A-K.
View 14 Replies
View Related
Mar 19, 2007
below you will see my macro. I have a slight problem, everything works perfect, except when I change file names. Basically I keep an electronic backup every day of the file I create. So today's file will be named DOH031907, tomorrow DOH032007, Wednesday DOH 032107, etc. etc. I use the same sheet, including the same Macro every day so it does the same thing. Basically everywhere you see "DOH031907Test.xls" I want it to put the current workbook file name there. I'm new to this kind of stuff but it seems like there is an easy solution.
Sub DOHComplete()
'
' DOHComplete Macro
'
' Keyboard Shortcut: Ctrl+Shift+T
'
ChDir "K:PICDailyMetrics"
Workbooks.Open Filename:="K:PICDailyMetricsGMDEMAND2.XLS"
Windows("DOH031907Test.xls").Activate
Sheets("EDI Demand").Select
ActiveWindow.SelectedSheets.Delete
Windows("GMDEMAND2.XLS").Activate
Sheets("EDI Demand").Select
Sheets("EDI Demand").Copy Before:=Workbooks("DOH031907Test.xls").Sheets(3)
Added Code tags - Moderator
View 9 Replies
View Related
Apr 5, 2007
Without using VBA code, is there a way to display or find the worksheet number of the active worksheet you are viewing? All my sheets have names, and I have a lot of them.
When I want to loop through a set of them with code, I want to know what numbers they are beforehand.
View 9 Replies
View Related
Jan 19, 2009
Is it possible for a macro to delete any sheet that within a workbook that does not match a specific list of sheets. For example a workbook will always have Sheet1, Sheet2, Sheet3, Sheet4... but it can have many other sheets added to it. The names of the sheets can be completely different however the sheets that I want to keep will always have the same name.
View 9 Replies
View Related
Sep 29, 2009
I'm sure there's a way to do this, I just haven't put my finger on HOW just yet. I have a list of stock tickers which can vary from 1 to say, 10. I need to use each of those 10 tickers in the subject line of a message. I thought I could do something with SPLIT, but that's not working for me. Here's what I have so far: u = the count of tickers. Column O contains the list of unique tickers
View 4 Replies
View Related
Mar 20, 2007
I have a nifty formula brought to me by one of the excellent members on this board. It works perfectly for what I want, but I must admit I cheated, I have a problem that was similar to the problem this formula rectified and I find myself not knowing how it works.
=IF('IIC Transfer Status'!O139="x",MIN('IIC Transfer Status'!K139+10-WEEKDAY('IIC Transfer Status'!K139-{1,3})), "" )
What Im wondering is if someone could enlighten me as to what is happening in this function, so Im not as blind to assume it is magic.
Eventually I need it to be customed tailored to work in this way: I have a column of dates, I want it to look at column A and if there is a date in it ADD 4 WEEKDAYS (business days) and return the resulting date.
i.e date in column a is march 19 plus 4 business days. Result in column B march 23.
If someone can explain how this string works that would be great, or if someone could just post a suitable function, that would work for now.
View 9 Replies
View Related
Aug 13, 2008
have a link such as www.abc.se/downloadfile?file=12345. When opening this link in a browser the DownloadFile window popups and the file can be downloaded.
I would like to be able to download the file without involving the DownloadFile pop up (since some users have auto open enabled thus the downloadfile pop-up is not always shown)
I have tried URLDownloadToCacheFile and similiar methods but they fail as they dont have the direct link to the file.
So my question now is how can I extract the direct url?
There should be a way to capture it since it will be used in the downloadfile dialog.
View 9 Replies
View Related
Aug 25, 2006
Got a bit of a stinker here. (Well, it is for me anyway. I haven't used Excel in months)!
I want to use a VLOOKUP function (I think) to retrieve data from a list of Exchange Rates on a separate sheet.
The user enters a 'Period' number, selects an 'exchange' variable (the blue text cells). The hope is to lookup the data on the 'FX RATES 06-07' sheet and return the result in the green cells.
I've tried using VLOOKUP but one of the arguements specifies that you nominate a column to return the information - that's the problem, we don't know that information when asking Excel.
View 4 Replies
View Related
Dec 2, 2008
On my spreadsheet i have a bunch of variables:
A1 = Arrival time at Checkpoint 1 - 5:53:08
A2 = Time to destination from Checkpoint 1 - 1:10:18
B1 = Arrival time at Checkpoint 2 - 6:00:56
B2 = Time to destination from Checkpoint - 1:02:30
C1 = Total distance from Start - 2.83
C2 = Arrival Time at Destination - =SUM(A1,A2)
D1 = Speed determined from the other variables
D1 is SUPPOSED to equal 25.00
It also is where I am stumped!!
Not only can I not figure out the math but also how to format the function to get the right answer.
ps: Arrival Time at Destination is only included in case it would be useful to find the answer!
View 7 Replies
View Related
Feb 18, 2008
I have a macro that inserts a formula on the first row and then copies it down. The problem is the row count is variable but I know it won't exceed 5000 so I just copy it down 5000. For the blank rows I get the ugly #NAME, #VALUE, etc errors.
I know there are ways to supress those error messages, but how about a way so that the macro checks to see how many rows are populated so it doesn't copy down on the blank rows.
View 9 Replies
View Related
Apr 13, 2009
on sheet 1 which is named front cover i want to type in cell C8 a number or a name and it will change sheet 2 tab to what i type i have 20 sheets to do
i can get it working in b5 on same sheet
but i need it to work from the front cover sheet
View 6 Replies
View Related
Sep 15, 2008
My workbook has a summary page and one page for every day of the month. I am making a template file, so I can duplicate it to use every month of the year.
Each week is separated by a worksheet titled "week 1", "week 2" , etc. This is used in the summary page so I can gather totals for a week.
What I want to be able to do is this:
On the first day of the new month, go to week one and type in the date. Then that sheet tab would equal the date, and each daily tab name thereafter would increment the appropriate amount (1day). Then on week 2, it would be equal to the tab value for Friday +3.
The problems I see are:
1. In week 1 the month can start on any on of the 5 worksheets I have set up to cover the week. So any first day coding I need may have to be repeated in the first 5 worksheets
Is this do-able?
2. Tab naming code I have found on this site is not working for dates. 9-15-08 typed into a1 will not translate into the tab, even tho it is a valid name. I am using code VoGII gave which follows: ...
View 9 Replies
View Related
Apr 30, 2009
Can a macro be written that will automatically NAME a sheet with the contents of a particular cell?
View 3 Replies
View Related
Aug 24, 2009
We utilize a shared spreadsheet in our department named "Arrangement Requests".
From time to time and seemingly very random the sheet renames itself. When this happens anyone adding information to it becomes unable to save since the original "no longer exists".
This causes problems because everything we do is in real time and expected to be viewed by all as soon as save has been indicated.
View 13 Replies
View Related
Dec 7, 2006
I have stored the name of 12 different userforms in a col of spreadsheet.
I want to use the text in these cells to choose the required Userform.
I have tried:
FormName=range("A12")
FormName.Show
but that gives run time error 424, 'Object Required'.
View 9 Replies
View Related
Jul 15, 2009
Ok I have an input box that takes a date as mm-dd-yy
View 14 Replies
View Related
Dec 1, 2009
make the auto naming code displayed on the worksheet tab die after first entry into, so that regardless whether any values are changed in the worksheet--a minute, hour, day after-- the "namedate" stays the same.
View 3 Replies
View Related
Feb 21, 2009
Attempting to modify a list of names. Currently they are last name, first but I want to compare to another list that is first name last.
Ex:
Billingsley, George
formula to change to:
George Billingsley (no comma)
View 5 Replies
View Related
May 24, 2012
How do I name a Variable for a formula in VBA? Example: I want to name the results of Cells A1 + A2 = X. Then I want to add C1 + X = and make that results a variable less say Y
I have a very large formula and if I can name varaibles it would be much easier.
View 3 Replies
View Related
Feb 8, 2007
regarding this article:
[url]
Is there a way to name a tab with some combination of 2 or more cells?
A1="first"
B1="last"
so, the tab name would be "firstlast".
also, can a space be inserted?...i.e. A1&" "&B2
View 9 Replies
View Related
Jun 6, 2007
I want to use the range in this code that works fine in one work book from sheet to sheet...
But i need it to run across 2 workbooks that are both open at the same time... The data its bringing back will be in a seperate workbook.
Sub zzzz()
Sheets("Sheet2").Select
Range("A3:M16").ClearContents
c = 3 'Paste Range Return Test
x = Worksheets("sheet1").Cells(Rows.Count, 1).End(xlUp).Row 'data source
For a = 1 To x
If Worksheets("sheet1").Cells(a, 3) = Worksheets("sheet2").Range("a1") Then
For b = 1 To 20
Cells(c, b) = Worksheets("sheet1").Cells(a, b)
Next b
c = c + 1
End If
Next a
'Range("C3:C15,F3:F15,I3:I15").Select
'Selection.Delete Shift:=xlToLeft
Range("A1").Select
End Sub
View 9 Replies
View Related
Jul 26, 2007
I have a spreadsheet which has four columns and numerous rows
Example:
Location - Desc - Price - ID#
Electric - Duplex Outlet - $5.00 - 12-0001
I would like to use VBA to name ranges. I need to name the Desc., Price, and ID# columns separately and want to use the Location and the headings of each column as the name range. Example - the column containing Duplex Outlet would be named ElectricDesc.
This is what I came up with, but need to figure out how to make "add name" a formula combining Location+Desc. I tried concatenate (B1,A2) but it did not work.
ActiveSheet.Names.Add Name:="MyRange1", RefersTo:="=$A$1:$B$10"
View 10 Replies
View Related
Aug 20, 2007
To automatically make the name of a sheet tab the same as in cell A8 of the same sheet, I'm currently using the following code ...
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Name = Range("A8")
End Sub
however, I find that if I change the name that is in cell A8, the tab name doesn't change accordingly.
I need a code that will name the tab whatever is in cell A8 but also be fluid enough to change the tab name if the contents of cell A8 changes.
I do not want this code to operate all sheets, but only a few.
View 8 Replies
View Related
Apr 30, 2008
Is there a way to name a sheet in vba? I am creating new sheets in vba, and renaming these tabs, but is there a way to actually rename the sheet (so that in the properties window it says (Name) "Demand" AND Name "Demand" Instead of (Name) Sheet1, Name "Demand"?
View 9 Replies
View Related
Dec 22, 2008
Basically my code creates a load of checkboxes and I need to name them appropriately as they will be used in the next part of the code.
I haven't had a problem changing the caption properties etc but I need the name to be meaningful and unique - it works fine if I just want each checkbox to be called i.e. "CB1" etc but I want the name to be derived from a range within the worksheet.
Below is an extract from the
the_row = 10
For Each Item In ActiveSheet.OLEObjects
If Item.progID = "Forms.CheckBox.1" Then Item.Name = WorksheetFunction.Substitute(ActiveSheet.Range("C" & the_row).Value, " ", "_")
If Item.progID = "Forms.CheckBox.1" Then Item.Object.Caption = ""
If Item.progID = "Forms.CheckBox.1" Then Item.PrintObject = False
the_row = the_row + 1
Next
Column C contains the name which is unique to each checkbox, I simply need to replace any spaces with "_" but when I am not defining a set text string the name of the checkbox does not change.
View 9 Replies
View Related
May 14, 2003
I'm in the process of writing some SQL in excel and normally when I want to specify a field name as another name say wx22 as Part Number i just use square brackets eg
"select wx22 as [Part Number]"
View 9 Replies
View Related
Oct 12, 2006
how to name a chart? I've been accessing charts in my VBA scripts using chart names, e.g. "Chart 4". I've been determining the chart name by recording a macro and selecting the charts. But, is there a way to either:
1- change the name of a chart (as you would name a pivot table)
2- determine the name without having to select the chart in a recorded macro
3- reference multiple charts from the same worksheet without using their names
View 4 Replies
View Related