Sumif Giving VALUE# Error When Mixing Sheet References
Jul 29, 2009
I am very comfortable with using sumif statements although I have tried it link two data from 2 different sheets and I keep getting returned #VALUE!
I get a message "Unable To Read File" in a pop up box before fully opening.
View 9 Replies
ADVERTISEMENT
May 20, 2013
This works
ws2.Range("C5").Formula = "=sum(D5:ZZ5)"
guide me on the syntax when the final column reference is a variable
ws2.Range("C5").Formula = "=sum(D5:" & Cells(5, l_LastCol) & ")"
doesn't work
View 3 Replies
View Related
May 24, 2012
I'm trying to add the total product sold by a group of sales person for example : Chad + Javier. My actual worksheet includes 600 rows of salespeople and 20 rows of product, i'm using this simple example to get the message across.
I was using =sum(sumif(A1:A9,"Chad',D1:D9),sumif(A1:A9,"Javier",D1:D9)), the formula should have given 91, but instead is calculating 113...
Salers PersonProduct AProduct BProduct C
Chad567
Chad567
Chad567
Chad567
[Code] .....
View 1 Replies
View Related
Jun 22, 2008
I have two sets of two columns which contain numbers as text with trailing spaces and I want to concatenate column A and B and concatenate column F and G, and then compare them, and sumif value in column I if they are the same - giving the answer in the same row as the matching data in column A and B.. but in column J.
I’ve seen sum product and haven’t been able to get it to work at all. I have been adding the trim() function in around the column references to see if that would work but am failing…
A = 2000 text
B = 1234 text
F = 2000 trailing spaces, text
G = 1234 trailing spaces, text
I = 10,000
Answer in column J
I want 20001234 = 20001234 = 10,000 for the whole column.
I don't want to change the original data as its externally sourced and used for other links etc.. This would save a few hours a week if i ( more correctly, you ) could get this to work.
View 9 Replies
View Related
Jun 19, 2008
Sub testDateCompare()
Dim nmiDate As String
nmiDate = CDate("23/4/08")
Dim origDate As String
origDate = CDate("23/04/2008 15:05")
origDate = Left(origDate, InStr(origDate, " "))
Dim minDate As String
minDate = WorksheetFunction.Min(origDate, nmiDate)
MsgBox minDate
End Sub
Giving '400' error!?
View 9 Replies
View Related
Feb 4, 2009
I have a CSE formula that's been working great since day one.
In B202 I have the name Magnecraft.
In Row9 I have all the possible sources for this item starting in D9:CB9.
The fx in C202 is as follows:
{=SUBSTITUTE(MCONCAT(IF(INDEX(D202:CC202,MATCH(B202,B202:B202,0),0)="X",","&$D$9:$CB$9,"")),",","",1)}
I have an "x" in E202 and I202.
C202 should then show (in this case) Abacus and A/E as the 2 sources available.
I'm getting an #NAME? error.
And if I insert a new row, all the data in each cell in C"C turns to #NAME?.
View 9 Replies
View Related
Feb 9, 2007
I am using VB6 to automate excel. Ofcourse, the code needs to work with 2007 and all lower levels. When trying to save the excel doc in 2007 I get no errors. However, in 2000 (using the same code) I am unable to save my document.
Here is the
OfficeDoc.SaveAs FileName:=NewFileName, FileFormat:=FileFormatValue
It fails with error 1004: application-define or object-defined error.
I have checked to make sure no other office documents are running in the background under task manager.
View 9 Replies
View Related
Sep 20, 2005
I have the array formula:
=SUM(IF((Sheet1!$Y1:$Y5809="26")*(Sheet1!$AJ1:$AJ5809=CREDIT!$A4),1,0))
It works fine except I want it to reference the cell that the number 26 is in rather than having to have it in quotes, i tried this, but don't get the same answers as this way. The reason being is more conditions may be added in the future which would mean for example the 26 could change to a 34 etc so i rather not have to have someone manually change that number in the formula and just have it refence a cell.
View 9 Replies
View Related
Jan 19, 2012
I'm getting a mismatch error on my If activecell.value > 5 Then portion of this code. I'm trying to say if the value in column AG is greater than 5 then create an email address from the first and last name. I've even made sure to copy and paste the formula results as values.
Code:
Sub CheckPFPDates()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Dim emails As String
Dim salution As String
Dim currenttime As Integer
[Code] ........
View 2 Replies
View Related
Feb 28, 2014
When i try to add comment to range of cells, i am facing error.
rng.AddComment "Comment"
View 2 Replies
View Related
Nov 2, 2007
My indirect formula doesn't work when I have the entire path defined. I have the entire filepath specified (which will never change), and then I have cell A6 with the tab name of the worksheet on the workbook
.
Workbook 1 named 'Testme' contains the table with range a2:b5
Worbook 2 contains the formula
I put this formula into workbook2 (the tab in the example is named hitab & I put that name in cell B6)
Here is what I have:Does not work even when other workbook is open
=VLOOKUP(B6,INDIRECT("'H:CUSTOMERSCurrentClientAMRO and General SuppliesBearings, Motors, PTsSavings Tracking[Testme.xls]"&A6&"'!a2:b5"),2,FALSE)
This DOES work when workbook is open, but not when it is closed (which would seem logical if when the workbook is closed, the formula needs the exact path)
=VLOOKUP(B5,INDIRECT("[Testme.xls]"&A6&"!$a$2:$b$5"),2,FALSE)
I can hard code everything except the tab name. Why doesn't Indirect recognize an entire file path and also why does it give a REF error?
- I did a search and found that some people said to use the add-in Indirect.exe. I followed the link and the page was no longer found.
View 9 Replies
View Related
May 29, 2006
I am trying to use the Special Cells Goto and Paste, but I am getting an error saying 'this operation requires the merged cells to be identically sized' when I do the Copy the value that I want, Goto Special|Constants, then Edit|Paste Special|Values|Multiply. The cells containing constants are selected and if they are together, e.g. B7 & B8, then there is no problem, but if they are apart e.g. B7 & B9, I get the error.
View 5 Replies
View Related
Mar 4, 2008
I am trying to used match function in the code but I am getting the following error:
Run time error '1004'
Unable to get the match property of the worksheet-function class
Here is the
View 9 Replies
View Related
Jul 8, 2006
The following code is giving me an object-defined or application-defined error:
wsDst. Range("E" & NextRow) = "=VLOOKUP($B" & NextRow & ",PriceList!$A:$IZ,MATCH(HLOOKUP($I" & NextRow & ",PriceList!$C$3:$IZ$3,1,1,PriceList!$A$3:$IZ$3),FALSE)"
View 6 Replies
View Related
Mar 3, 2009
I created several macros objects to do simple hide columns, filter on, filter off, etc. type functions, using the Tools / Record Macro feature. Then discovered they won't work in a protected worksheet. Is there a way around this situation, other than turning protection off? Here's an example of the code for one of them, although I get the error or every attempt to perform a macro once the sheet is protected:
View 4 Replies
View Related
Nov 28, 2013
I have 2 excel files (both .xlsx) and in the first file i am creating a reference to cells in the 2nd file using SUMIFS function. The 2nd file has 275,000 rows of data. I can create the formula correctly, however when i save the file, it just crashes every time (says not responding). If i create simple reference (=A275000) then its fine so im not sure what the issue is.
View 1 Replies
View Related
Oct 9, 2008
Below there is code for some inputboxs as well as some if statements on their results. The Exit sub situations work fine but If i do actually put a valid answer in the secod input box then it results in a mismatch error on the OR statement... why the first inputbox works fine but the second one gives me a type mismatch error when a valid input is given? Also if there's a more efficient way to do this please feel free to correct the code.
View 4 Replies
View Related
Nov 3, 2009
I have an excel database which links into Outlook and Word via macros to automate sending of e-mails and creating documents, etc. Obviously, I have created the correct VBA references and things have been working fine for a while.
However, this is a shared workbook over a small number of machines and due to a recent upgrade, one of the machines is running Vista and Office 2007, whereas the rest run Office 2000 and NT.
All works well until the workbook is opened and saved on the Office 2007 machine as this then changes all the references to Word 12, Outlook 12, etc, instead of Word 9 as seen in Office 2000. Then, when an office 2000 machine opens the workbook, it has a compile error as it cannot find the office 12 references!!
I have created some code to fix this, which uses the AddFromGuid method, which works ok, e.g.:
View 14 Replies
View Related
Jul 16, 2009
when combining two columns using C1=A1&B1 formula, the column C only works until the columns A and B exist; and the column C does not work when deleting A or B.
View 5 Replies
View Related
Dec 30, 2009
I've got an Excel document I've built which uses multiple ODBC QueryTables
View 3 Replies
View Related
Jun 19, 2009
i m working on an excel 2007 workbook with ms project functionality. in order to be able to use ms project from within excel i m using early binding. for those who dont know what early binding is: http://www.dicks-clicks.com/excel/olBinding.htm
this works fine if the user has ms project installed on his/her pc.
if the user does not have ms project installed i remove the broken references. this works fine.
but my problem is that when i remove the reference to ms project, my vba project will not compile correctly. thus each time when a user opens the workbook the user gets a "compile error in hidden module" , since the functions of ms project are not available.
for example i get a compile error in the following source
Public Function getResID(ResName As String, ActiveProject As Project) As Integer
Dim res As Resource
For Each res In ActiveProject.Resources
If res.name = ResName Then
getResID = res.ID
Exit Function
End If
getResID = -1
Next
End Function
i just want to know what i can do to prevent the compile error? would the use of late binding remove the problem? actually i dont want to use late binding since my source code is already very complex and it would be a huge effort to change it.
View 9 Replies
View Related
May 1, 2007
I have made an input form which the user can input the data of person they wish to sit.
I then used Vlookup to put this data on to a smaller table.
This will make more sense on this download of the program.
http://files-upload.com/199899/MainInput.xls.html
What my problem is....is that i have too rooms and i needed excel too look at the cell see that they want to sit in room one then it looks at what table they want to sit at then looks at the seat they want to sit at then put them there.
View 9 Replies
View Related
Jun 17, 2009
I am using the SUMPRODUCT formula as a SUMIF with multiple conditions in the following format:
SUMPRODUCT(-(Range1=CellReference),-(Range2>0),Range3/Range2)
THis works with or without the 2nd condtion, but I thouht the "greater than 0" bit would eliminate the inclusion of 0's; however, the same #DIV/0 error occurs with or w/out that ">0" condtion as the 1st OR 2nd argument.
I speculated that b/c the final argument was dividing each paid of cells in either range instead of a typical sum, this caused the divisor error.
View 9 Replies
View Related
Jul 15, 2009
I have this formula in a excel file called test.xls which does a SUMIF on file "Sales By Customer v3 17-11-08.xls". It works fine when I have Sales By Customer v3 17-11-08.xls open at the time. When I close it the file displays a #VALUE in the cells
My formula is:
=SUMIF('G:FINANCEAccantia Budget2009Sales and GC[Sales By Customer v3 17-11-08.xls]DP Total'!$B$7:$M$7,Cover!M$85,'G:FINANCEAccantia Budget2009Sales and GC[Sales By Customer v3 17-11-08.xls]DP Total'!B9:M9)-'Page 15'!E9
This is really annoying as the formula works, and you need to open the linked file to display the results, otherwise you get the #VALUE. Is there anyway around this and why is it doing it??
View 4 Replies
View Related
Jan 13, 2014
I'm working on doing some data analysis on an excel workbook that comes from a tracking website's reporting system. The data is inconsistently merging some cells in rows where there are multiple entries in a column, and on other cases is not merging those cells.
The format of the spreadsheet is as follows:
A
B
C
1
Account #
Current Services
Order Status
2
1234
PACK1
Completed
[Code] ....
In this example, cells A3:A5 have been merged by the reporting system's export function, but B3:B5 were exported as individual cells. On the other hand, cells A6:A12 are not merged into a single cell.
My goal is to look at the values in column B for each account and compare them to an array of service package codes and to see if any values in B match value in that array for each account number. If the system of cell merging was being consistently applied across all cells, I could figure out a way to link the results for each group of cells in column B to the account number they match up to, but since there are some account numbers that are in unmerged cells, I'm not sure what to do.
I can't alter the way the reporting system exports its data to Excel format, so how to deal with a mixture of merged and unmerged cells in column A. How I could do this without a lot of manual adjustments?
View 3 Replies
View Related
Feb 27, 2006
I need to get a subtotal of a range (eg: A1:A30), however some cells in this range have #N/A errors due to particular formulas they contain. I could go into these cells and add a formula which 'catches' these errors, but there are far too many given my current time constraints.
Is there any way to use SUMIF to add the cells which do not contain errors and skip the ones that do? (ie: SUMIF($A$1:$A$30,""&"Error Parameter")).
View 9 Replies
View Related
Feb 18, 2009
Sorry, could not get the html maker to work, so I will try to describe my problem.
(HTML maker problems were one error 429 followed by 3 of error 91, the summary screen of characters used/available and another error 91)
I will use logical column letters and numbers in the example shown below, ie A through F and 1 to 5.
Column A is the period for a report, columns B and C are costs under different headings.
Column D should not be required but contains the basic formula of =SUM(B1:C1) filled down
Columns E & F containg different SUMIF formulae in an effort to understand the problem
Basically I am using a SUMIF formula and getting peculiar results.
Period 1£1.00 £2.00£3.00 Period 1Period 2
Period 1£4.00 £1.00£5.00 £4.00£0.00
Period 1£2.00 £3.00£5.00 £7.00£4.00
Period 1£0.00 £2.00£2.00 £15.00£5.00
Period 2£4.00 £1.00£5.00
The formula in E2 is =SUMIF(A:A,"Period 1",B1:C5), the answer should be £15.00 as in E4
The formula in E3 is =SUMIF(A:A,"Period 1",B:C), a different but equally wrong answer
E4 uses the information in C to arrive at the correct answer ie =SUMIF(A:A,"Period 1",D:D)
The formula in column F are identical excepting the criteria used is "Period 2"
These results are from the actual workbook but when I copy the figures and formulas to a new workbook The results in Row 2 are the same as those in Row 3, in other words it is only summing column B if the critera is matched.....
I am totally flummoxed by this as it should not be there - have I missed the real obvious or stumbled upon a flaw in Excel or is it my copy of Excel that is playing up... (Excel2003, SP3)
View 9 Replies
View Related
Jul 28, 2014
Copy "SheetA", and you get "Sheet A (2)". But i want all of the formulas in second, just copied, sheet to reference first one. So what in "SheetA" was =W1 in "Sheet A (2)" should be =SheetA!W1. Is this posible?
If not, is there any easy way to add a prefix to selected range of formulas. I tried Find/Replace, but it ignores the formula and i end up with just a plane piece of text.
View 5 Replies
View Related
Jun 20, 2006
I'm having some trouble coding a macro that copies data from one sheet in a workbook to the next sheet in the workbook, and the problem seems to stem from my lack of knowledge about how VBA refers to sheets. What I'd like to do is copy data from a range of cells in the next-to-the-last sheet in a workbook to the same range in the last sheet in the workbook.
Each day, I add a blank sheet to the end of all the sheets in my workbook. I insert some data into it, then go to the previous sheet, copy some data, return to today's sheet (the one I just added) and paste the data. I can record a macro that will do this perfectly, but it only works for the two sheets in which I record the macro. I need a way to change the sheet references so it always copies from the next-to-last sheet to the last sheet.
View 3 Replies
View Related
Apr 22, 2009
I'm currently working on a summary page for the defects in the building we are working on.
I've done up a summary page which reference's cells in other sheets which contain a TEXT(COUNT formula. When I goto SUM these referenced cells in my summary page I keep getting it returning '0'.
Example of what I'm doing:-
Defects Column in Summary Page
411 --> referenced from =Basements!L1 --> L1 contains =TEXT(COUNT($C$8:$C$100),"0") formula
56 --> referenced from =Level1!L1 --> L1 contains =TEXT(COUNT($C$8:$C$100),"0") formula
33 --> referenced from =Level2!L1 --> L1 contains =TEXT(COUNT($C$8:$C$100),"0") formula
When I go to do a simple SUM of 411,56,33 via =SUM(D3:D5) it returns a zero?
View 6 Replies
View Related