Hello everyone
I am trying to return a value based on three criteria ..
Here's my try
When running the code I got an error "Type mismatch"Please Login or Register to view this content.
Here's the attachment
Thanks advanced for help
Hello everyone
I am trying to return a value based on three criteria ..
Here's my try
When running the code I got an error "Type mismatch"Please Login or Register to view this content.
Here's the attachment
Thanks advanced for help
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
What is the result that you are looking for?
It looks like COUNTIFS would do what you want.
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
I want simply to depend on three criterias : first in column A - Second in Column B - Third in column C and finally return the value n column D
I can use one of the following formulas tp do the task
or the array formulaPlease Login or Register to view this content.
Please Login or Register to view this content.
Your formula string is 304 characters long - the limit is 255. Get rid of the (external:=True) and your code should work.
Instead of a macro, you could use this in cell G7
=GetData(G3, G4,G5)
Or use
=SUMIFS(D:D,A:A,G3,B:B,G4,C:C,G5)
and skip the VBA altogether.
Last edited by Bernie Deitrick; 02-17-2016 at 10:47 AM.
Bernie Deitrick
Excel MVP 2000-2010
Thanks a lot Mr. Bernie for this wonderful help
Actually the modification of the UDF function by removing External=true solved the problem
But there is still a problem for me ::: the criteria may occur more than once .. in this case all solutions failed as the solutions sum the values and I don't need to sum .. In this case I need to return the first occurence only
The only successful formula for that task is the array formula
Now I need to convert this formula to UDF function as this is a part of another complicated code ..Please Login or Register to view this content.
Please Login or Register to view this content.
Thank you very very much for this wonderful and awesome solution
Thanks a lot for offering help
Kind Regards
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks