IF / OR & Sum Statement Help

EmmaFos

New Member
Joined
Oct 25, 2020
Messages
25
Office Version
  1. 2016
Platform
  1. Windows
Hi
Really hoping some awesome individual might be able to help me with my below formula,

I need to look at multiple rows in another workbook and if a cell =1, then divide I17 in original worksheet by the sum of workbook 2's numbers.

Excel Formula:
=IF(OR('[Workbook2.xlsx]BLD 21'!AP$8=1,IF('[Workbook2.xlsx]BLD 21'!AP$17=1)),$I17/SUM('[Workbook2.xlsx]BLD 21'!$AS$8:$FH$8,'[Workbook2.xlsx]BLD 21'!$AS$17:$FH$17),"","")


This formula works perfectly if I only need to look at a single row... it's adding additional rows that has me stumped!
Code:
=IF('[Workbook2.xlsx]BLD 21'!AP$41 =1,$I6/SUM('[Workbook2.xlsx]BLD 21'!$AS$41:$FH$41),"")

Thanks so much for your help!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Are you Tested it with Ctrl+Shift+Enter
 
Upvote 0
How about
Excel Formula:
=IF(OR('[Workbook2.xlsx]BLD 21'!AP$8=1,'[Workbook2.xlsx]BLD 21'!AP$17=1),$I17/SUM('[Workbook2.xlsx]BLD 21'!$AS$8:$FH$8,'[Workbook2.xlsx]BLD 21'!$AS$17:$FH$17),"")
 
Upvote 0
Solution
Thanks you so much, this works perfectly! :)
I have just been thrown another curve ball with the data, instead of summing all the cells together. is there a way I can do a count of how many cells across the data is contained in? I.e if two rows have data in adjacent columns have 2 each, can I ignore the second set of 2? This one is totally out of my skill level!

Thanks again
 
Upvote 0
I'm afraid I have no idea what you are saying, but as this is now an obviously different question, it's better if you start a new thread.
 
Upvote 0
Thanks, I'll create a new thread and supply the example
 
Upvote 0

Forum statistics

Threads
1,215,799
Messages
6,126,975
Members
449,351
Latest member
Sylvine

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