FIND is a very powerful function in VBA but it doesn't support OR condition. Hence, if you want to find say two values "A" or "B", then you can code an array within FIND. To do OR in FIND, you will need to use following code (this is a sample code only, there can be many variations of this code) (more…)
Below is a possible solution to the challenge Challenge 26 – Find Sum given multiple OR conditions across columns.
Put following formula for the result -
The workbook illustrating the solution can be downloaded from Solution - Challenge 26 – Find Sum given multiple OR conditions across columns.
-- The Excel file related to this challenge can be downloaded from Challenge - Multiple OR Conditions ---
Given your data below, you need to find the total sales for cities given in F1 to I1 and zones given in F2 to I2. Either city has to match in F1 to I1 or zone should match in F2 to I2. If both city and zone match, it should be considered once only not twice.
Seattle East 20
Seatltle West 10
Miami East 30
Denver South 50
The answer for above for Seattle and East should be 20+10+30 = 60 not 20+20+10+30 = 80
You may post your answer in comments section.
Note - Solution to this challenge will be published after 1 month i.e. on 25-Oct-15.