Referencing Workbooks ..
Jul 20, 2008
I have this excellent code which I found on here that looks at the data in column A, looks at the data in column B & then returns the differences ie.
A_____________B_________C___________D______________E
John________Jimi_________________Not in A_______Not in B
Paul________Sporty________________Jimi____________John
George______Ginger________________Eric____________Posh
Ringo_______Scary_________________T-Bone__________Baby
Posh________Eric
Scary_______Ringo
Sporty______Paul
Ginger______George
Baby________T-Bone
Here is the code ....
View 9 Replies
ADVERTISEMENT
Jun 6, 2014
I'm trying to set-up a costing system as follows:
Each job has it's own xls file, this is a list of manually input costs and a total cost at the bottom (total is the same Cell reference: G24) for all xls files. The xls file is named the same as the job - F0001, F0002 etc.
At the end of every month we then want to create a master list xls file for all jobs being invoiced that month. This is a list of all the jobs - F0001, F0002 etc. In Column A, and the corresponding cost totals in column B.
In the master file we want to be able to type in the job reference to column A (i.e. the file names of the single job files -F0001, F0002 etc) and have the corresponding total for that reference display automatically in Column B (i.e. Cell G24 from file F0001 will display in the master file cell B1, when 'F0001' is typed in cell A1).
Ideally the master file would display all the individual entries automatically, so no need to input the job references either - simply scanning the directory for the other files present and creating a list automatically in the master file, alternatively it can get the job reference from Cell A1 in the individual job files, instead of from the file name.
View 2 Replies
View Related
Oct 22, 2008
I'm trying to get a system setup with a workbook acting as a reference document, sort of read only and on a separate server. Which is then referenced by another "working" workbook, no problem so far other than I want to be able to view/show images from within the main reference workbook in the destination working workbook. I want this to happen when a user inputs a code, it should populate a series of cells including showing a small jpeg of said item.
For example if I use the camera function it doesn't do as desired when the main reference workbook is not currently open.
I was hoping to avoid macro's or vb if at all possible.
I'm a bit of an Excel novice though have limited programming experience in other languages / applications. I'm also a complete novice when it comes to forums and threads etc. so excuse me if I mess up protocol at all.
View 9 Replies
View Related
Nov 3, 2009
I have a workbook for each day recording energy usage from 52 meters,
I need to collate the data on a single workbook.
The only way i can think of doing it is to use the INDIRECT function but this will not work on closed workbook.
I need to sum the contents of B1:AW1 on the closed workbook and input that into a cell on the new sheet.
then repeated for B2:AW2, B3:AW3 up to B52:AW52 once this has been done the process needs to be repeated for 31 workbooks.
The end product should be 31 Columns (one for each day ini the last month) and 52 rown (one for each meter) and the total daily consumption for each meter (sum of column B:AW)
View 6 Replies
View Related
Jul 20, 2012
I'm trying to optimize code by avoiding activating other worksheets, but I'm running into a problem with a match function.
I'm using a workbook called "Template" and then opening another workbook called "DCP" and trying to use the match function to figure out what row data is on. I can get this first line of code to work:
HTML Code:
MatchedRowNumber = WorksheetFunction.Match(Combo, Sheets("Sheet1").Range("A:A"), 0)
However for that to work, I have to activate the other workbook. I want to avoid that and stay within the "Template" workbook. I think I need something like this:
HTML Code:
MatchedRowNumber = WorksheetFunction.Match(Combo, DCP.Sheets(DCPSheet).Range("A:A"), 0)
That one however doesn't work... looks like I have the wrong syntax.
Below is an excerpt for the code in case something is wrong with how I set the variables.
HTML Code:
Sub StockOrderByDCP()
Dim Template As Workbook
Dim DCP As Workbook
Dim MSS As Worksheet
Dim DCPSheet As Worksheet
[Code] ..........
View 4 Replies
View Related
Aug 5, 2008
I would like the user to select two files, the macro then inputs a formula that includes vlookup to the other sheet. However i am not sure how to reference each workbook.
Sub InsertLocationContents()
Dim rng As Range
Dim LastRow As Long
'OPEN CSV FILE WITH LOCATION CONTENTS
csvFN = Application. GetOpenFilename(Title:="Select Location Contents csv file")
If csvFN = False Then
' They pressed Cancel
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
Workbooks.Open Filename:=csvFN
Workbooks.OpenText Filename:= _
csvFN, Origin:=437 _ .............................
View 9 Replies
View Related
Aug 13, 2012
How to copy a formula (16 columns) from a workbook to another, without referencing the source workbook.
Some people are using tricks such as replacing the equal sign "=" for another character such as "^" then using replace all to put the equal sign back again... but this is too much trouble.
View 2 Replies
View Related
Dec 13, 2013
I have an Excel file that contains formulas that reference external workbooks on a shared network. Each month, I copy the column of formulas over to the next month's column. Then, to update the file path, I highlight the new column and do a Find-and-Replace, swapping the previous month's name for the current month. This practice works fine. The only thing is ... the "Open File" promptbox appears for each formula where I updated the file path (i.e. and this can be hundreds instances!). I wind-up having to choose the file from the exact same file path. It is an unnecessary, and annoying extra step to take.
View 2 Replies
View Related
Jun 26, 2014
I have 25 files with certain worksheets that I need to move to 25 other files.
Worksheet 1, 2, 3 and 4 in Workbook A needs to be moved to Workbook A-2014 Worksheet 1, 2, 3 and 4 in Workbook B needs to be moved to Workbook B-2014 Worksheet 1, 2, 3 and 4 in Workbook C needs to be moved to Workbook C-2014 etc....
Is there a way to do this with a macro? Preferably I would like to do this automaticly - i.e. runing the macro from a master file that
1. Opens Workbook A copies the worksheets
2. Open Workbook A-2014 paste the sheets
3. Save and close Workbook A-2014
4. Close workbook A without saving
then doing the same for Workbook B, etc.
View 5 Replies
View Related
Dec 27, 2009
Basically the main workbook opens 2 files at a time performs a calculate in the main workbook and then copies and pastes information in 3 ranges. Then closes the two open workbooks and loops and performs same operations until it hits the maximum loops. My macro is as follows and I have 3 question in capital letters.
View 3 Replies
View Related
Oct 1, 2008
I was wondering if using INDIRECT() function, or something like it in VBA, I could set a range as a reference instead of a fixed value... example below: Instead of the range being fixed on the first line,
View 4 Replies
View Related
May 30, 2007
I have a drop down menu where the user can chose between a,b,c and d. I would like to use this further in a formula. The formula is defined by me, although I dont think its relavant.
Lets say the drop down appears in B2, and I have got a formula called
Test1(B2). However this retunrs me an error. The contents of B2 is in string format.
- Test1(B2) does not work
- Test1(a) does work (assuming a is what B2 shows)
I would like to know how I can reference B2 as an argument in Formula, so it does not show error.
View 9 Replies
View Related
Oct 21, 2008
I have 2 columns of info. 1 is a complete list. The other has many of the same values, but is missing a lot of the values in column one. I am marrying the two lists to see where the data gaps are. Both lists are from different databases and I need to know which data the second DB is missing. Currently I am lining the 2 columns up and doing it manually. Is there a way to do this quickly as there is about 1000 records.
View 2 Replies
View Related
Dec 2, 2008
looking for a formula that will get me the sheet name.example: I have 3 sheets each named X, Y, Z. in cells A1 I want the name of sheet 3, which would be X
View 2 Replies
View Related
Dec 19, 2008
I need to create a worksheet whose sole purpose is to return the values from every 17th row from another worksheet in the same workbook.
I have spent a few hours trying to research the correct answer and OFFSET comes close but either I'm doing it wrong or it's not what I need.
I want to be able to drag the (every 17th row from sheet 1) formula down about 100 rows.
Assume A1 as starting place. I would prefer a formula answer as opposed to a macro or VBA.
View 13 Replies
View Related
Jan 22, 2009
I have a workbook (Workbook A) which I need to lookup ( Vlookup() )something in a different workbook (Workbook B). In workbook A I need to lookup many (I mean hundreds) of values.
My question is: What do i put in the function tab (where we put the formulas and references) to lookup values in different workbooks? And if possible, is there a way to define a workbook A to ALWAYS look up values in a defined workbook B.
View 3 Replies
View Related
Jun 24, 2009
way to reference the name of a worksheet in a cell, or even better, use a cell reference to dictate the name of a worksheet.
In other words, I would like to create a new sheet, and set it's name ='Sheet1'!C1 so that if I changed C1, the worksheet would automatically be renamed to whatever is typed in C1.
If that is not possible, I would like to have a cell be tied to the name of a given worksheet, so that if I renamed the worksheet, the cell would change accordingly...similar to the &[Tab] function used in headers/footers.
View 13 Replies
View Related
Dec 23, 2009
I have an XLS spreadsheet which updates cells through an ODBC connection to a database. The information is pulled across ok and 90% of the Vlookup and IF statements work. The problem arises on a summary page.
When i start off the summary page has cell references in numeric order to another spreadsheet and pulls back the information to 4 cells Across and 1000 Down. ='Campaign Responses - Cash Break'!A2
This is a spreadsheet that changes once the queries have run and a number between 1-1000 records are returned. However once the data has changed and the page refreshed. Not all the results have been pulled across to the summary pages. A few are there but the numeric sequence jumps from......
View 2 Replies
View Related
Oct 23, 2013
I have several options in one list, call it MASTER.
When I pick Item A from the MASTER, I want to show all available options for that Item A in another list, called OPTIONS.
I have 10 Items, and they all have a variation of 6 different options, some Items have 1 option, some have all 6.
Anyway, the worksheet I found is attached, but cannot figure out how this is working.
View 14 Replies
View Related
Oct 7, 2008
I have made 2 macros that run one after the other to perform a certan task. My issue is that I want to run Variants that I have defined in Macro1 In Macro2 but I dont know how to reference them macro 2, or if there in the same module do they recognize the varients anyway??.
I'll list the variants defined below; could someone provide me with the proper code to reference the variants form macro1 in macro2. I am also wondering if it would be easier to combine both macros under one macro and simply put a pause in the macro between both section and have a certain command to resume once the user decides to( so it would have to be a user command such as a button). If you think this would be easier could you please provide the code to pause the macro until A button is hit. both these methods woud be useful to me elsewhere as well so if it's not to much to ask could you provide both methods.
View 2 Replies
View Related
Aug 20, 2009
First of all, I'm completely new to both this forum and VBA. I have just done a programming course in java before. I hope you will forgive me if this have already been posted. No to my problem.
I am tryring to use different projected values to project other subparts of those units, which is done in the sheet mean needed weekly. Tje values are taken from projections. The answer that I get from mean needed weekly should be copied to a third sheet.
This is the code that I am using right know, but I cant get the for loop to work (or more exactly to be able to place the "i" in my text without making compilation errors).
View 9 Replies
View Related
Dec 1, 2009
I have a worksheet titled "Systems Estimate" that will dictate values on a second worksheet called "CSI Estimate". They're the same values in each cell and column, just in a different order row wise. I would like the values in each row in the A column in the "CSI Estimate" sheet to dictate columns B through W, with the values being referenced from the "Systems Estimate" sheet. I tried using an exact match with vlookup since the data isn't sorted, however it just returns the formula I enter, not a value.
View 3 Replies
View Related
Dec 3, 2009
Relative referencing in VBA. I have this formula in one of my modules:
View 4 Replies
View Related
Jun 26, 2006
I have a cell that mentions the year (G7) and the sheet mentions the pay period beginning (ex: January 1).
I would like to have a different cell (B9) combine the two into a date that other cells would recognize as such.
For instance, if the sheet name is January 1st and cell G7 has "2006" as a value, then I would like B9 to read "1/16" (year not shown). From there another cell (A13) would show that day/date as "Sunday, January 01, 2006".
View 11 Replies
View Related
Feb 8, 2012
Here is a formula I am trying to use to access another woorksheet to compare the values in J13 in each worksheet.
=IF(J13=INDIRECT("'"&$O$4&"'!"&"J13"),"▬",(IF(INDIRECT("'"&$O$4&"'!"&"J13")=" ","▬",(IF(J13=" ","▬",(IF(J13>INDIRECT("'"&$O$4&"'!"&"J13"),"▼","▲")))))))
Where O4 contains the name of the first worksheet.
I want the formula reference [J13] to chage to J14, J15 and so on.
View 3 Replies
View Related
Nov 30, 2006
I'm dealing with a DDE link and have a cell that works when I type in the value =WINROS|AVEVOL!XOM . But I don't want to manually enter each value. So I have tried to use =INDIRECT("WINROS|AVEVOL!" & A2) where A2 contains the value 'XOM', but I get a #REF! error.
View 9 Replies
View Related
Dec 29, 2006
here's a simple discription of what I would like to do:
I have two worksheets open, SHEET1 and SHEET2
In SHEET1 I have numbers 1,2,3...10 running in cells A1.....A10
What I would like to do is add up a certain range of rows in
SHEET1 from target values I place in SHEET2
example:
in SHEET 2:
A1 = 3 ( I insert begining row )
A2 = 5 ( I insert last row )
A3 = equation to add up rows 3 to 5 in SHEET1, ie: A3+A4+A5
What is the equation I should put in A3? This driving me nuts!!
View 9 Replies
View Related
Apr 12, 2007
I have 8 sheets, named cpt1 to cpt8 in vba.
Now i need to loop through these 8 sheets, storing the same range of each sheet into a matrix. I have the following
dim test () as variant
For i = 1 to 8
(1) test = sheets(i).Range("b2:u21")
(2) test = cpt1.Range("b2:u21")
next i
Now (1) doesn't work, but (2) does. However i do not know how to reference the cpt1 sheet name using the for loop (ie "cpt" & i) Can anyone help me with getting this to work?
View 9 Replies
View Related
Aug 20, 2007
I am trying to create a macro that will do some basic math using J, I as referencing.
Sub Table()
Dim Temp
J = 2
I = 1
For Temp = 1 To Question
Cells(J + 35, I).Formula = (Cells(J, I + 2) + Cells(J, I + 2) * Cells(J, I + 3) - Cells(J, I + 4))
J = J + 1
Next
End Sub
how do I get the math to work without the R1C1 referencing?
View 9 Replies
View Related
Dec 22, 2009
Trying to build a form that helps assemble parts a pieces based on filling out just a small section of information. Here just a short example:
Tower Type: Type 1
Coax Length: 100 ft
Based on the above criteria, I am going to have a line item that auto fills specific parts and pieces based on the answer. The main problem I have is the coax length answer will fit within several ranges and I need a cell to be able to identify and autofill ALL of those ranges.
Specifically, if the coax length is between 0 and 100, I need to autofill the below cell with Coax 1, from 101 to 200 Coax 2, and so on and so forth. Lets say I have 5 ranges of "greater than, less than" values. how do I make a formula that will consider all of these in a VLOOKUP scenario?
If I haven't asked the right questions, or phrased them incorrectly, please let me know....I'm not the most excel experienced person...hence my visit to this forum!
View 9 Replies
View Related