Workbook Name As Cell Value
Jun 30, 2007I'm trying to find a formula that returns the name of the workbook. I only seem to be able to return the whole filepath.
View 4 RepliesI'm trying to find a formula that returns the name of the workbook. I only seem to be able to return the whole filepath.
View 4 RepliesI have 2 workbooks. 1 is where data is entered called wksPB, the other is like a database workbook. The wksPB has data to be feed from column B to F and there is a dropdown.
what im looking to do is, if the combobox value is selected as Decline then it should display a messagebox that reference value in cell B is denied. if combobox value is Agreed then the macro should search the database workbook for the text entered in column b of wksPB and then copy data of C:E of wksPB to H:J of database sheet where that text is found and also the approver name in wksPB C24 to the approver cell of where that text was found. I've reached till finding the text but what I get my head twiting on is how to copy the text from wksPB column B:F to database sheet column H:K. Im attaching the sample workbooks and the code where ive reached till.
[Code] .....
Attached Files
Replacement Records - 2014.xlsx
forum file.xlsm
On one workbook I have "column A" that lists serial #'s, one serial number per cell. What I need is to be able to take all the non blank data from that column and copy it to another workbook with all those serial #'s in 1 cell numerically sorted and separated by commas.
View 1 Replies View RelatedI'm trying to figure out a way to find a specific sheet in a workbook that does not contain the macro. Within the macro I have a cell which holds the name of the specific sheet I would like to find but I can't get it to work for some reason...
'Dim officen As Integer
'Dim thiswb As Workbook
officen = Range("A2").Value
Set thiswb = ActiveWorkbook
' Open the Active Info file
Workbooks.Open "C:My DcoumentsActive 20080616.xls", , , , "xxxxxx"
' Dim sourcewb As Workbook
Set sourcewb = Workbooks.Open"Active 20080616.xls"
Sheets("officen").Select
RowCount = ActiveSheet.UsedRange.Rows.Count
Range("B2").Select.............................
I need to create an automated process to copy data from book1 and book2 and paste it in another workbook called book3. I want vba code to do this task whenever I open my book3
Book1
Location: G:FUTOMS-phases - eTD and TDReference Infoook1.xls
Data to be copied: Entire Rows 6 to 12
Paste: Book3> Sheet1
Book2
location: H:OptionsInfoook2.xls
Data to be copied:: Entire Rows 1 to 5 & rows 10 to 15
Paste: Book3>Sheet2
Here is the scenario: I have workbook called Leads_2013-0215 it has about 10K records I have workbook called LawFirms it has about 4K records.
If the value in Column I in Leads_2012-0215 is present in column G in LawFirms, I want to add the value Law Firm to column AV in Leads_2012-0215.
I have two workbooks open. I need to "Save As" and close workbook 2 with a file name from a cell in Workbook 1. The macro is running from workbook 1.
I'm guessing a change in the last line. I don't know what Dim means either.
Dim FName As String
Dim FPath As String
FPath = "G:"
FName = Sheets("sheet 1").Range("A1").Text
ThisWorkbook.SaveAs Filename:=FPath & "" & FName
I have a workbook that is used to calculate values from various data etc. On completion of calculating the values, eg. £20,000, I want to put the values into specific cells of another workbook template. I can of course do it manually by selecting the cell of the template workbook and do an = then reference the the cell in the calculating workbook.
What I want to happen when all the calculations are complete is that:
1. A new workbook, based on the template, is opened and saved with an appropriate title
2 The values from the calculating workbook are automatically entered into the new (saved) workbook at specific cells
I want to open an excel file whose name is a value in a spreadsheet, and then pull a value from the spreadsheet I queried into my existing workbook. Here is the syntax i have so far:
to note: I'm calling the workbook in which the macro is located testproject.xls, and I'm using [integer].xls as my list of files that the macro will query. Ultimately, this code will go in a loop.
Set currentCell = Worksheets("Sheet1").Range("A1")
varCellvalue = currentCell.value
Workbooks.Open "path_of_file" & varCellvalue & ".xls"
Windows("testproject.xls").Activate
currentCell.Offset.(0,1).Select
ActiveCell.FormulaR1C1 = "=[3.xls]Sheet1!R1C1"
The problem is, I want [3.xls] to carry the sale value as varCellvalue with .xls appended, and not be kept static at 3. I tried inserting & varCellvalue & ".xls" into the brackets, but with no luck. My only difficulty is getting [3.xls] to vary along with varCellvalue.
I am trying to set up a template for my MD to use to calculate budgets and have so far encountered a number of problems most of which i have overcome thanks to help from this forum.
What i am trying to do is have a 'Selection sheet' which contains a number of drop down boxes from which the user can choose several different options.
Based on what they have choosen on this sheet a second sheet 'initial budget' is populated.
What i am trying to do is a formula similar to the following. but i can't seem to get it to work.
I have got a master workbook and I have written macro to copy and paste data on another workbook. write a macro to save the new workbook to a file path with a file name where both file name and path are stored in master workbook sheet...
View 5 Replies View RelatedWhat is the best way to reference a cell in another workbook and return the cell contents and the comment on that cell. I would like the comment to come across as a comment in the new workbook becuase the comment is actually a picture.
Hope this makes sense. I did find a macro through googling but I couldn't get it to work? I don't really want to copy and paste because eventually I have hundreds of sheets & thousands of cells to refer to.?
what code can be used to be place in a Command Button on a worksheet that will use the value in a cell, change it to the directory where it have to be saved and save it to the value of another cell. Example:
On a worksheet called "Customer", at cel A1 will be the customer's name and at cell A2 will be the asset number. Now let's say a directory does not yet exist on the root for this customer, a new directory must be created in the root directory by using the name in A1, and the workbook must then be copied and saved under the value of A2.
Display Alert On Closing If Cell Not Filled In
How do I alter this code so that it acts like an INDIRECT function so will pick up a cell reference in another cell?
I can't just use A1 as I want this to change dynamically.
I have Quote Master.xls open
I have a value in AA1 that carries a number
I want to open Quote Log.xls
I want to find the cell in Column A (Quote Log.xls) that AA1 (Quote Master.xls) directly corresponds to
I want to offset from that found cell 3 cells to the right and insert from T7 (Quote Master.xls) into this offset cell. Here is the code so far
Private Sub InputIntoQuoteLog7_Click()
Dim CostSheetBook As Workbook
Dim QuoteLogBook As Workbook
Set CostSheetBook = Workbooks("Quote Master.xls")
Set RFQQNumber = CostSheetBook. Sheets("RFQ").Range("AA1")
Set RFQQStartDate = CostSheetBook.Sheets("RFQ").Range("T7")
Workbooks.Open ("\ACT3ENGVAULT EngineersLsheriffDocuments (2008)Quote System MashQuoteLog.xls")
Set QuoteLogBook = Workbooks("QuoteLog.xls")
Set vOurResult = .Find(What:=RFQQNumber, After:=[A1], _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 3)
vOurResult.Value = RFQQStartDate.Value
End Sub
I get an un-numbered error on the .Find
I am trying to complete these steps:
Take a value from AK59 from the "EQF" tab in a file called "QuoteMaster.xls"
Use that value to find match in column "A" in a Seperate workbook "ITMSTR.xls" on the "Sheet1" tab
Offset to the right 1 cell of the found value, take back to the "QuoteMaster.xls" and put in cell "AN59"
My code comes up with no errors, it opens the file and closes is as shown, but it doesn't copy the value over for whatever reason...
I am entering data into one workbook 1 (WB1) that contains a worksheet for every month. I manually extract some of the data from WB1 and put it into workbook 2 (WB2), which also contains a worksheet for every month. Is there a way to populate WB2 from WB1? For example, I want cell B5 from WB1 to automatically populate B5 in WB2, and so on. I have to update this every day and would like to way to automate it to cut down on data entry errors since they need to match. And both of these files are stored in SharePoint for others to access if need be.
I have attached a sample of the workbooks (yet only have one month in each of these wb).
The following code works great, however I want to change line 6 to reference a name of a file located in a cell on the activeworkbook. I was trying something like: set wbook = awb.sheet("Data").Range("A22") & ".xlsx" but its not working.
Code:
1 Dim wbook As Workbook
2 Dim awb As Workbook
3 Set awb = ActiveWorkbook
4 awb.Activate
5 On Error Resume Next
6 Set wbook = Workbooks("Accounts by Contract Rep.xlsx")
[Code]...
I want to be able to identify an Excel workbook in a cell, then have another cell pull the value from a specific cell in that workbook.
In the sample attached, I want the formula in cell C4 to pull the value in cell D35 from the workbook identified in cell C3. When I click within the brackets [C3] it asks me to choose a file name from my Explorer file list. "='[other_workbook.xlsx]Audit Information'!D35. I don't want to do that and want it to choose the file listed in cell C3.
is there a non VBA way to insert the workbook name in a cell?
View 1 Replies View RelatedI have a work book, it copies a cell reference from a work sheet in workbook2 to workbook1
It then selects next work sheet in each page and then triggers the code again.
My problem is i want the following piece of code to work.....what should i put in where it says "activeworksheet"
[Code] ......
I have a spreadsheet which contains about 800 rows. Each row contains a column with the name of a different workbook. I need to scroll through each cell containing the name of a workbook and open that workbook, extract two specific cell contents from each workbook opened, and paste that information into the two cells next to the original cell containing the workbook name.
Example:
Summary Workbook column C: contains names of workbooks.
For each workbook name, I need to open the respective workbook.
Then in the first tab of the workbook I need to extract the information in E6 and K7 and copy that information back into the summary workbook in the two cell to the right of column C.
I would like a code that will look for a workbook and then look in cell a5 and return number to a45 of active work sheet. I would also need it to add a6 + a7 + a8 and return sum to a46
View 2 Replies View RelatedI would like a code that will look for a workbook and then look in cell a5 and return number to a45 of active work sheet.
I would also need it to add a6 + a7 + a8 and return sum to a46
VBA that will put the Sheet's file name & a dash with the sheet name in cell M1 when the sheet's name is changed (right click sheeted tab & rename).
For example:
When changing tab named Sheet2 to 08-39 for the workbook TaxWorkSheets.xls,
put in cell M1:
TaxWorkSheets.xls-08-39
say that in Sheet1 ( i renamed it to "Input Data") contain data in 2 cell:
Q5 = 08-AUG-2009
Q6 = 30
I want to use this cell to look up a folder name i.e: "Z:Shift ProdSouthCOMBINED LOGS 20098-AUG-200930" and use the code below, but didn't work.
I want to put the title of the work book in cell A1
I have been using =CELL("filename",A1) but this returns
W:APMProdqty8882Prod 2011[8882wk4011.xls]shift reports
Is it possible just to return 40 ??
I have a range of cells, A1-N1, that contains the names of each of my excel worksheets in this workbook. (ie A1=Brittany, B1=Corey). Each table in this summary sheet is the totals for that person for the month. (ie Total of the scores from Brittany's worksheet for the month). Because we have frequent additions to our workforce, I need to change the names / reorder alphabetically every month. I am looking to put together a formula that will read the name from A1, use it as a sheetname! reference in a formula that will say --- Pull the value for E11 from the sheetname from A1. Example -- If A1=Brittany, then pull the value from E11 on the Brittany! sheet.I have been working through this all day. I am still relatively new to Excel and completely self taught through books. I can't seem to find a reference for this. In my mind it should be possible so that if I change the names on that original A1-N1 list that the tables will all dynamically change to those names and pull the values from the correct corresponding sheet to that name.
View 2 Replies View RelatedI have to open another work book to get a certain cell with a value.
ex. in my source file (prod plan) i have columns A,B,C,D. in column B it contains Line1 up to Line10. In column C it contains Model and Column D it contains Quantity.
Prod Plan workbook
Sample:
A-----B-----C------D
---------------------
AAA--Line1--M1----87
BBB--Line2--L2-----45
CCC--Line3--X1----0
up to Line 10
I need to find all Lines (column b) as my reference to get the column D records using Excel Macro and paste or copy to another worksheet. Is this possible to use the IF to get the data from Column D or Looping. How to make this in Excel Macro.
Desired Result:
Line1|87
is there any way to show the Workbook name in a cell?
i can get it to show using the Footer but i would like it to show in a cell.
ie.
book1.xls