I have a colum of customer ids then I have aother colum of customer ids with a status number in the next colum
I've uploaded a sample colum a has the formula
the problem is it is not exact if it doesn't find the customer it goes down 1 row or so and puts in a number. I need to know if found replace if not fund have a 0 or a null or somehting
any help would be appreciated
If you're happy with 0 then a simple solution would be SUMIF
A2: =SUMIF(C:C,B2,D:D)
copied down
(there are no matching records in your sample)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
that worked great!
I have one more I tried the sumif and it didn't work I have the lookup in there but don't trust it
I want to compair 2 sets or custid's I want to lookup in colum a id from colum d and compair the to rf scores and show the difference if not found a zero woudl be fine
if what I have works I'm just confirming
Once again thanks
The issue with the SUMIF is that the numbers stored in Cols B & E are in fact stored as text - ie they are not "true" numbers.
An alternative approach:
The LOOKUP here is used as an error handler to return 0 for no match, if you're using XL2007 or beyond then useG2: =LOOKUP(9.99E+307,CHOOSE({1,2},0,VLOOKUP(A2,D:E,2,0)-B2)) copied down
of course if you want to treat "not found" as 0 in terms of the subtraction the above can be modified accordinglyG2: =IFERROR(VLOOKUP(A2,D:E,2,0)-B2,0) copied down
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
g2: =IF((SUMIF(A:A,D2,B:B))>0,E2-(SUMIF(A:A,D2,B:B)),0)
The above worked when I used the
G2: =LOOKUP(9.99E+307,CHOOSE({1,2},0,VLOOKUP(A2,D:E,2,0)-B2))
I still got numbers in colum g for custid that were not found
The above formula works
Thanks for all your help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks