In Column A row 4 of sheet1 I have an account name, for example Sonic, and I have a sheet named the account name, Sonic. In Column B row 4, of sheet1, I would like to return the value in Column B row 3 in sheet named Sonic, or the account named sheet.
I have about 50 different account names along Column A in sheet1, and the same account name sheets opened in the same workbook. Is there a good formula or vba code that will work for all the values in Column A of sheet1 to look for the same named sheet and return the values off of that? Note: on the account sheets in Column A it says ‘Account’ for all of them.. this wasn’t a mistype
1) I'm relatively new to arrays, but what I need to do is generate a list of file names and the sheets within each one. I would like to use an array for this, but since I don't have much experience.... well....that's why I'm here. Can someone point me in the right direction?
2) And the second part of this.... I was planning on using the FileSystemObject to determine the files in a selected folder and loop through that list of files, opening each one and harvesting the required info (file name and all sheet names). Should I use the FSO or is there something built into Excel that might be better (and also limit the number of dependencies for this little "project" of mine).
I have workbook that has several sheets within the workbook that are set up identical. Each of the sheets in the workbook are for a specific company.
As of right now I have been adding a sheet to the workbook that is an overview for what is in each sheet (the individual companies). Currently I am doing the formatting of the heading and column names manually and I pull the data from each sheet with a VLookup. I have been trying to enhance my VBA skills with coding something that will fill in the appropriate cells from worksheet to worksheet.
What I am trying to do is to populate an overview sheet with cells C24, C25, and B36 being static on each row per sheet. Then each row will be populated with cells C(36, 59, 70, 81), D(36, 59, 70, 81), F(36, 59, 70, 81), G, and H(36, 59, 70, 81). The overview sheet will have the diagram below in a ru
I have an excel sheet which at the moment takes it name from a cell on that sheet, but what I would like to reverse if possible. How can I get the sheet to name itself from a cell. I'm sure I've been on a web page in the past with this info on it, does anyone have the link?
I’ve had a look through the forum and on some of the guides/FAQ but thanks to my ineptitude I have been unable to adapt any of the examples to my specific situation.
What I’m after is this: I need to create a summary sheet for a work book with a variable number of tabs. All I need the summary sheet to do is to make a table of the name of the tab and then cell A17. How would I go about doing this and is it possible to save this macro to my machine/all workbooks instead of just the one?
I wrote the following macro to create hyperlinked Table of contents on the first sheet of a workbook. It works great unless the sheet name has a space in it, i.e. "new sheet" as opposed to "newsheet". Any way to get it to work for either/ or?
Originally Posted by Code
Sub Hyperlink() ' ' Hyperlink Macro ' Macro recorded 2/26/2007 by bpillsbu '
' Dim ShName As String Dim ShCt, N As Integer Dim Sht As Worksheet
ShCt = ThisWorkbook.Worksheets.Count Range("A5").Select N = 1
I have searched the forum and I have seem quite a few referrences to this question but can't find exactly what I'm looking for. I'm using the first sheet in the worksbook as a splash screen which has lots of button macros on there. I want to add one more which will make a list on this sheet from cell b25 down with all the sheet names in the workbook which are also clickable hyperlinks. Does anyone have any idea how to do this, so far I can make a list of the names..
Sub Index() Dim ws As Worksheet Dim I As Long
I = 25 For Each ws In Worksheets If ws.Name "Actions" And ws.Name "summary" And ws.Name "Archive" Then Worksheets("Summary").Range("B" & I) = ws.Name I = I + 1 End If Next ws
But have no idea how to make these names clickable which will make the relevant sheet active. If it helps the sheet name is also in cell A2 of every sheet.
I have done a formula for Abbott as shown below however I actually have about 50 sheets with names. I have the names listed in column A. Is there a formula that instead of typing Abbott as shown I can use the cell in column A to generate a code ?
The Board looks full of some interesting issues today.
I'm working on a workbook that hides and unhides a lot of columns depending on the month the user has selected. No problems here.
The sheets are named regionally, ie National 2008, California 2008 etc. The user is able to select the month and the year from separate combo boxes.
So when 2009 comes around I will need to rewrite many lines of code to point the VBA to the new worksheet names like National 2009, California 2009. My question is, is there a way to reference either variable worksheet names in the VBA or some other manner in which to write the code so I don't need to rewrite every year change?
I currently reference the sheets something like Sheets ("National 2008").Range("H:H").EntireColumn.Hidden=True
I have a spreadsheet with sheet numbers that are controlled by the tab name. Is it possible to limit how people name the tab? For example, my sheet numbering must be: 101, 102, etc. Thus the tab would of course be 101, 102, etc.
I have been using the code below for a form. But now I need to change the sheet name to have spaces. But when I do. I comes up with the Run Time 1004 error on the “Ctrl.Text = Range(Ctrl.Tag).Text '*** “ line.
Why is it that this line is not allowing me to have spaces?
Private Sub Load_Controls() Dim Ctrl As Control For Each Ctrl In UserForm1.Controls If Ctrl.Tag "" Then Ctrl.Text = Range(Ctrl.Tag).Text '*** End If Next Ctrl End Sub
I want to add to it so that if the "Name" entered into the target cell is longer then the maximum allowd length it inserts an abreviation of the words (and increments where nessisary)
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) On Error GoTo StandardName If Target.Address = "$B$4" Then Sh.Name = Target Exit Sub StandardName: Sh.Name = "Sheet1" End Sub
I have a named range, "DDNames", on a master data input sheet and in that range are names of donors. In the same workbook I have sheets that provide a quarterly summary of each of the donors. I have named the sheets "Smry_Miller", as an example. Miller's name is in the named range, as well as others, for the format for each summary sheet is Smry_NAME.
I have a few things I want to do on each sheet so I am working on a FOR loop so I can make my code easily scale-able for when we get new donors or lose one. I get a Run-time error: 9 on my code and I'm just down right stumped.
VB: Sub MakingLoop() Dim arrAllDD As Variant Dim i As Long Dim varDDNum As Long varDDNum = Range("DDNames").Count
The debug highlights the line "Sheets("Smry_" & arrAllDD(i)).Range("G1") = arrAllDD(i)"
I'm looking to pull names from a database to a particular sheet based on what info is displayed in the database. I have six names listed in the database with a league type and position. I have three different tabs at the bottom for where the info is supposed to pull depending on the player type.
For example, I want all six players to pull to the 'Mixed' tab and populate the appropriate area based on their position. Next I'd like the 3 players with 'AL' for their league type to populate only on the AL tab and likewise for the players with 'NL' for the NL tab. Not only do I need the players to pull to the appropriate tab but i also want them to populate in the right position within that tab.
I have a namd sheet for everyday of the year in a workbook, so jan1 jan2 jan3 etc. I have a stats page which brings together certain pertinent data from those pages, so a formula on the stats page might look like this =sum('jan1'!$m$25:$m$900). What I would like to do is to name each day - jan1 jan2 etc as a named range perhaps date1 date2 etc so that the above formula would then look like =sum(date1!$m$25:$m$900).
I want to capture data from another workbook each month where the sheet name that I need the data from changes each month. i.e. 0810, 0811, 0812, 0901. Are possible sheet names. I've tried to build this unsuccessfully into the my -
How can I fill a Listbox on a worksheet with all the work sheet names in a workbook. If one is added it will update the listbox, not using a userform. All the sheets will be hidden except main sheet with listbox?
I need a macro that will look for a list of sheet names - like Albany, Houston, Denver - and return the value of a particular cell - like B25 from each sheet and display it in a column of cells on a summary sheet.
I have a very simple userform that i'm using to allow users to name their 'location'
Private Sub CommandButton1_Click() ActiveWorkbook.Unprotect If Me.TextBox1.Value = "" Then Beep MsgBox "Please give your location a name" TextBox1.SetFocus Else Sheets("Template").Visible = True Sheets("Template").Copy Before:=Sheets(1) ActiveSheet.Name = TextBox1.Value Sheets("Template").Visible = False
ActiveWorkbook.Protect Unload Location
As i'm sure you've already guessed, there is nothing stopping a user from trying to rename the new sheet with an existing name. Is there anyway of checking the entry and workbook for duplicated enteries?