IF AND, IF OR Sum Complex Formula Help

dmill8023

Board Regular
Joined
Aug 24, 2012
Messages
60
Hello All,

Looking for help with a formula. I have attached a sample data set (see below 4 rows) and will spell out the logic I hope to obtain. I can include further information if it is not clear what's trying to be accomplished. I have 4 validating criteria that have been provided weights. I need a formula to go across the 4 validators (columns) look at validator "A" and "C" and identify if those values are 0 to skip over that row. Now, if "A" or "C" is populated I need that row to still be accounted for, just those ones where "A" and "C" = 0 are they to be skipped over. So in my data set below the first row would be the one skipped over but the 3 next would all have the sum of their percentages in the column to the right of "D".

If "A" and/or "C" are populated I need to sum those percentages together in the next column to "D". Does this make sense? If not I will try and clear up my request. All help is appreciated!!
A</SPAN>
B</SPAN>
C</SPAN>
D</SPAN>
0.00</SPAN>
25.00</SPAN>
0</SPAN>
33.00</SPAN>
0.25</SPAN>
0</SPAN>
0.25</SPAN>
0</SPAN>
0.25</SPAN>
0</SPAN>
0</SPAN>
0</SPAN>
0.25</SPAN>
0.33</SPAN>
0</SPAN>
0</SPAN>

<TBODY>
</TBODY>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Please disregard the solution was found internally. Can post if you'd like but it was a nested IF(OR statement
 
Upvote 0
Not sure what you mean by sum of percentages....other than that I can do what you want quite easily.
 
Upvote 0
I was going to suggest:

Sub Macro1()
'
' Macro1 Macro
'
Dim UsedRows, i, Result
With ActiveSheet.UsedRange
UsedRows = .Rows.Count
End With
For i = 2 To UsedRows
If ((Cells(i, 1).Value <> 0) Or (Cells(i, 3).Value <> 0)) Then
Result = ((Cells(i, 1).Value + Cells(i, 2).Value + Cells(i, 3).Value) / 3)
Cells(i, 4).Value = Format(Result, "Percent")
Else
Cells(i, 4).Value = "A and C both 0"
End If
Next

End Sub
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top