Formula Returning NA Unless Source Is Open

Sep 29, 2011

I am currently pulling in all cells from various worksheets, into a specific tabs in a workbook. Each source is pulled into a seperate tab such as Workbook A is pulled into tab Company A using the following formula which works fine.

Code:
"Path[Workbook.xls]Worksheet!ReferenceCell"

Note: This is done due to the use of indirect in the next formula and its inability to work on closed workbooks. Within a summary tab, I am then pulling in specific fields from each of the aforementioned worksheets using the following formula

Code:
=IF(OR(M$220="",M$218=""),"",IF(ISNA(VLOOKUP($B223,INDIRECT
("'"&M$217&"'!"&M$220),COLUMNS(INDIRECT(M$220)),FALSE)),"",VLOOKUP
($B223,INDIRECT("'"&M$217&"'!"&M$220),COLUMNS(INDIRECT
(M$220)),FALSE)+M$222))

M217 - Worksheet Name
M218 - Worksheet Date
M220 - Worksheet Range
M222 - Additional Fee
B223 - Lookup Value

The issue is that one company out of 14 pulls into this workbook (using the first code) just fine with all values visible, but ONLY when the source file is open. Even if I manually update the link, the values do not change.

Is there a setting or something to check, maybe in the source workbook? I have ensured that automatic updates for links is on and there are no macros in the source workbook.

View 2 Replies


ADVERTISEMENT

Source Data In Pivot Cache Returning Error

Jan 25, 2013

What is causing this to error. Basically I'm just trying to highlight cells, and create a pivot table out of that. Here's my Code:

Sub Macro1()
'
' Macro1 Macro

Dim myRange As String
myRange = "Sheet1" & Selection.Address

Sheets.Add

[Code] ..........

When I debug, the value of myRange is something like Sheet1$A$19:$K$37 with the actual cell values being whatever I highlighted. I get a Runtime Error 5 Invalid procedure call or argument. I'm assuming it's something with my sourcedata variable, but I'm not sure what.

Also, I did try commenting out the Sheet.Add and Sheets("Sheet2").Select Cells(3, 1).Select lines, but it still produced the same results.

View 9 Replies View Related

Query - Source Already Open

Jun 23, 2006

I've run across something a little strange. I have a query (in, say, Workbook A) that links to a table in another Excel workbook (call it Workbook B). If somebody happens to have workbook B open (it's on a network) and I try to refresh the query, it actually opens workbook B to refresh the query. If it's not being used, it just refreshes without opening the file.

The issue is that I'm refreshing using macros, and when another workbook pops open, the macros break when they try to use other sheets and ranges and stuff. Obviously, the simple answer is to just use a whole bunch of "ThisWorkbook" statements to make it work. However, I never wanted the workbook to be open in the first place. What's more, if I refresh the macro again, an additional VBA project opens for workbook B (so, now I'd have 1 project for WB A, and 2 projects for WB B). This just seems odd.

Anyway, my question is this:

1) has anybody seen this before, or is it explainable?
2) Is there a way in VBA to determine if a file is in use prior to opening it?

View 3 Replies View Related

Using VBA To Open And Close Source File

Feb 1, 2010

I am working with a bunch of files to do a dashboard. I have the main file which shows end results and what my users will see "Dashboard". I have about 10-15 files which I export weekly from MS Access. and I have the "Dashboard Data" file. In this file I have a sheet which links all the information for the files exported from MS Access. In here I have named ranges and dynamic ranges plus additional columns created to look up information in other tables. I use this file as my source data for my Dashboard File so that I can reduce the size of the actually dashboard. Dashboard Data file is about 5.5 mb and my Dashboard is 300kb. I have 12 branches that need to view the data over a radius of a hundred miles so the smal file are better.

My problem: I can get the Dashboard Data file to update without opening all the 10-15 other files. I cant however make the Dashboard file update without opening the Dashboard Data file. I have it to auto update without prompting but its still tells me that it cannot update. I was wondering if there is some VBA code I could use that would work like this:

I open the Dashboard File, Dashboard Data file opens so that Dashboard file updates and then close Dashboard Data File so that the user never has to see the Dashboard Data file. I dont want them to see it or have access to it.

View 11 Replies View Related

Correlation Matrix - Cannot Open Source File

Apr 24, 2014

I have a workbook entitled "Correlation Matrix". I download data from my data provider and then update it in excel each night. I have several worksheets in the workbook, one called "MCC". Today I made a copy of MCC, named MCC2, to experiment, then deleted it. Now, after I update my data in Excel it gives me the msg, "We can't open the source file '(Path)[Correlation Matrix.xlsx]MCC2'".

The data updates fine and all values are correct in the worksheets. I've tried closing and reopening the file, closing and reopening excel, but I'm still getting this msg when updating the data.

View 2 Replies View Related

Average Data After Doing Sumproduct To Avoid Having Source Open

Jun 29, 2013

I am pulling data from a database and want to do an average based on data that was input per day, basically I did a SUMPRODUCT in a different file to avoid having the source open, but I can't make it average the data and disregard if there were ZEROS in that day.

e.g.
Column A Column B Column C
6/25/2013 A 1.3
6/25/2013 B 1.45
6/25/2013 C 1.9
6/25/2013 D 0

In the other file I would need to summarize the average of the Data from COLUMN C based on the day but without counting the zeros

View 1 Replies View Related

Excel Links Only Updates When Source Workbook Is Open?

Mar 24, 2014

I built a template which pulls data from the source file using formulas. the problem is formulas doesn't give any error it updates the right value when the source workbook is open.

I Thought problem could be with the formula and tried just Source A1=destination A1. it also updates only if the source file is open. when the source file is closed it shows the last captured value.

The source file is on the (Work) Network Drive and is accessible to few people. my template is password protected (tabs) so formulas cannot be deleted.

View 1 Replies View Related

Moving Data From Source To Destination With Open / Close

May 12, 2014

My first shot at a function! hows it look?

Code:

Function wbIsopen(wbname As String) As Boolean
On Error Resume Next
WbIsOpen - (workbooks(wbname).Name = wbname)
End Function

[Code]...

This is also my first shot at using a DIM and Set. I am attempting to move the data from 1 workbook sheet to another after it has been sorted. But if i only have the source open i want it to open the destination workbook and sheet then paste and close the source sheet. If the source is open I want it to go to the next command.

View 3 Replies View Related

Returning Focus To Browser Tab That Is Already Open?

Apr 1, 2014

I am aware that what I am hoping to do may well be impossible because it is possibly application-dependent.

Anyway, I wanted a piece of code that would allow me to open a default browser window from an Excel Macro.

Google turned up the following solution from here [URL] .....

[Code] .....

This seems to work just fine.

What I want to do now, however, is something like this:

[Code] ....

Is it even possible to write the two hypothetical functions described above?

In addition, I notice that they example given in the link that I posted also suggests ActiveWorkbook.FollowHyperlink. This seems to work just as well, without needing the ShellExecute prototype. Is there any way that I can get a "handle" for the window that was opened with FollowHyperlink and re-focus on that window?

View 7 Replies View Related

Runtime Error 1004 - Cannot Open Pivot Table Source File

Nov 14, 2012

I am trying to adapt a macro to run on data that is consistently in the same format but the data does change, the macro needs to run over and over on new excel workbooks, dynamic range ? instead of a set source ?

Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"weekly71012!R1C1:R9379C30", Version:=xlPivotTableVersion14). _
CreatePivotTable TableDestination:="Sheet1!R3C1", TableName:="PivotTable1" _
, DefaultVersion:=xlPivotTableVersion14

I am sure this is the problem as i initially created the macro using weekly71012 excel file however i just want it to run on every file i pull it off?

View 2 Replies View Related

Run-Time Error '1004' Cannot Open PivotTable Source File 'Consolidated Report'

Oct 2, 2008

I have a macro that takes the date from different excel sheets, consolidates the data and renders the pivot table and chart accordingly. It was working fine when the date range defined for the pivot table was static. Now I have made it dynamic since the data range changes each month depending on the number of days it has got. When I run the macro, it runs succesfully, generates the report and save & close the report, but after that I am getting this error. Errorneous

View 2 Replies View Related

Embedded Pdf File Open Error "Cannot Start The Source Application For This Object."

May 21, 2007

I have embeded a PDF file in an Excel Worksheet. When I double-click to open the PDF file the I get an error message: "Cannot start the source application for this object." However, the pdf file opens anyway. how to prevent the error message from displaying (without stopping real error messages)? (...happens in Excel 2000 and Excel 2003) NB: I researched this site first - user "Ed" raised the same issue 27/1/03 - but it doesn't appear to have been resloved.

View 4 Replies View Related

Automatically Going To The Formula Source

Mar 17, 2014

Is there any way to directly go to a formula? Instead of searching it through all the sheets? For example, if I have a formula =SUM(Sheet1!A1:A5) is there any way for me to automatically go to the source?

View 7 Replies View Related

Copy Formula With Source Destination

Dec 10, 2009

I am sure this is simple but cant get me head around it (tried paste & paste link).. I am wanting to copy formulas in file (A) to file (B) with data source linked in the file (A).

i want is when i copy the formulas to file (B) sheet 2 and it should retain the original path say H:excelfile A[sheet1]$G$1+....xls and source from which the data is being used.

View 7 Replies View Related

Changing Formula Data Source

Oct 16, 2006

I've a set of excel sheets reading from a single excel data source, the only problem is that the data source is constantly changing, for example:

=DCOUNT('T:GreenbeltProductivity ToolWeek 42[Dept Overall and Data Entry.xls]Insert Data - Current Position'!A:F,5,AC139:AD140)

The week number is the only bit of the code that needs to change week on week, to update the data source on all the sheets and I'd like to password protect the data source.

View 5 Replies View Related

#Value! Formula Error When Source Closed

Dec 30, 2007

I'm compiling statistics from a number of separate workbooks. When I (or more to the point - one of my staff) open the Stats Workbook the formulas show #VALUE unless the other Workbooks are opened. I want the Stats to calculate without the user having to open the other workbooks as most users won't know which ones to open.

I could generate VBA code when the workbook opens to also open the other ones but wondered if there was another solution.

View 9 Replies View Related

DataValidation Source Box With Formula Invalidates List?

Aug 27, 2013

[URL]

However, when I use the IF statement in the data validation Source box, it invalidates the fact that you can only choose from the list. In other words, the user can now enter anything.

View 7 Replies View Related

How To Modify Source Data When Using VLookup Formula

Dec 17, 2013

I have 2 sheets, lets say SheetA1 and SheetA2. I am using Vlookup to serial number & getting data from SheetA1 to SheetA2. But I want to modifty the data. If i modify the data in SheetA2 that modification should relect in SheetA1. Is it possible...

View 5 Replies View Related

Copying Formula Down With Horizontal Source Data

May 26, 2013

I am trying to copy a formula in B38, down to B36

My formula needs to refer to data in of cells in a horizontal succession, G1, H1,, I1...etc

Copying my formula down from B38 causes the formula to refer to G1, then G2, G3... instead of G1, H1, I1 ...

The exact formula in B38 is: =$B$3*(G3*(1-$D$13))

Where G3 should advance to H3, when I drag to copy the formula from B38 to B39. Instead, G3 advances to G4.

View 2 Replies View Related

Formula Shows An Error Once Source Is Closed

Nov 30, 2007

I am linking two worksheets together. Formulas work fine except when I close the source sheet, it turnes into #REF error. I saw in one of the posts that you can not use INDIRECT formula on closed workbooks (INDIRECT is a part of the formula in my sheet) and downloaded the changingExternal. zip file as directed. Although, after staring at it for a while, I realized that I had no idea as to what was going on in there.

View 3 Replies View Related

Formula Returning Value N/A

Aug 14, 2013

It works I1 is blank and it works when F7:K7 has data and I1 is initialed. However, when I1 is initaled and there is no data in F7:K7 the cell reads "N/A". It should read "Approved with insufficient data".

=IF(ISBLANK($I$1),"",IF(ISBLANK(F7&G7&H7&I7&J7&K7),"Approved with insufficient data",LOOKUP(99999999999,F7:K7)))

View 4 Replies View Related

Sum Formula Returning Zero Value

Dec 17, 2009

I am trying to sum a column with values using a report downloaded from Celltracker, however the sum total is returning as zero.

When added using =a1+a2 the value returns correctly.

View 9 Replies View Related

Validation Source: Change The List Source

Apr 1, 2009

Not sure if this can be done, still a rookie at this stuff. Everything works but can something be wrote into code too change list source?

View 5 Replies View Related

Formula Returning Following Wednesday

May 8, 2014

I need a formula for cell P5 that returns the date for the following Wednesday from a date in cell I3?

For example, if in cell I3 01/05/2014 (through to 06/05/2014) is entered, cell P5 should show 07/05/2014

If the Wednesday date is in cell I3, cell P5 should should that same date (e.g. 07/05/2014 in cell I3 and P5).

View 3 Replies View Related

IF Formula Returning Two Results?

Feb 21, 2014

I am using this formula. How can I get it to pull 'Sales Materials'!$F17:$F69' and display along with 'Sales Materials'!$B$17:$B$69 when my logical statement is true.

=INDEX('Sales Materials'!$B$17:$F$69,SMALL(IF('Sales Materials'!$E$17:$E$69="YES",ROW('Sales Materials'!$B$17:$B$69)-16),ROW(A1)),1)
I've tried using * but I think something is going on with "-16" which I was told to you use to account for headers.

View 2 Replies View Related

Sumifs Formula Returning Zero

Sep 21, 2009

=AVERAGEIFS($D$106:$D$2825,$D$106:$D$2825,">"&$I117,$D$106:$D$2825,"<"&$J117)

Returns = 0

But on a copy of the same worksheet, the same formula returns the correct value. Is there something wrong with my formula cotext?

View 6 Replies View Related

Worksheet Formula Returning Nothing

Nov 18, 2008

the formulas in sheet 2 of the attached file, the formula from rows 27 is returning nothing, and I think I’m not getting the formula right. It may need a little correction.

View 5 Replies View Related

Average Formula Returning DIV/0?

Mar 3, 2014

I am trying to average a data set where some rows at the moment are blank but will update at a later date, I am getting a div/0 error, the formula I am trying to use is

=IF(C23:C30="","",AVERAGE(C23:C30))

I thought this would look at the data and see if its blank leave it blank but if there are numbers there it would give me an average.

View 4 Replies View Related

Why Countifs Formula Returning Zero

Jul 1, 2014

I have a Countifs formula that is returning a zero "0",

=COUNTIFS($B$4:$U$4,$A29,$B$10:$U$10,B$18), and it should return a 1.

The manual calculation is turned on and I have tried the F9 and no change in the value returned.

View 2 Replies View Related

Vlookup Formula Returning #N/A

Oct 5, 2007

I have the following Vlookup formula:

=VLOOKUP(G3,'Calculation for September 07'!C7:E1975,2,FALSE)

The formula is returning #N/A, but I see the lookup value in the table array.
What do I need to add to the formula to have the lookup value recognized?

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved