darkbluecat
New Member
- Joined
- Jan 7, 2021
- Messages
- 20
- Office Version
- 365
- Platform
- Windows
Okay so the first IF statement works:
IF($E$1<>"none",SUMIFS(Raw!$AF:$AF,Raw!$R:$R,'Emission factors'!$C5,Raw!$D:$D,'Emission factors'!E$4,Raw!$W:$W,'Emission factors'!$E$1,Raw!$A:$A,'Emission factors'!$G$1),SUMIFS(Raw!$AF:$AF,Raw!$R:$R,'Emission factors'!$C5,Raw!$D:$D,'Emission factors'!E$4,Raw!$A:$A,'Emission factors'!$G$1)))
Where "none" is when no date is selected from a drop down. Raw refers to the raw data sheet, emissions factors is the sheet I'm working on. Now the last condition for each sumifs refers to the second drop down I've made next to the date drop down, referring to the 4 categories the data is in which is in a column in the raw data tab: this works with each of the 4 categories.
- now I have a fifth category in the drop down which is "All", similar to the "none" date selection where it returns all, for example if I chose none for the date selection and all for the category it would give me each of the things in the raw data I'm summing. - my question is how would I add this into the calculation above?
can't provide any more info as it's for work but the above calculation does work for the categories just need the values to return all in case "All" categories are selected where no specific category is selected. Colour coded text for what the calc is referring to. I just need an option in case "All" is selected rather than a specific category.
IF($E$1<>"none",SUMIFS(Raw!$AF:$AF,Raw!$R:$R,'Emission factors'!$C5,Raw!$D:$D,'Emission factors'!E$4,Raw!$W:$W,'Emission factors'!$E$1,Raw!$A:$A,'Emission factors'!$G$1),SUMIFS(Raw!$AF:$AF,Raw!$R:$R,'Emission factors'!$C5,Raw!$D:$D,'Emission factors'!E$4,Raw!$A:$A,'Emission factors'!$G$1)))
Where "none" is when no date is selected from a drop down. Raw refers to the raw data sheet, emissions factors is the sheet I'm working on. Now the last condition for each sumifs refers to the second drop down I've made next to the date drop down, referring to the 4 categories the data is in which is in a column in the raw data tab: this works with each of the 4 categories.
- now I have a fifth category in the drop down which is "All", similar to the "none" date selection where it returns all, for example if I chose none for the date selection and all for the category it would give me each of the things in the raw data I'm summing. - my question is how would I add this into the calculation above?
can't provide any more info as it's for work but the above calculation does work for the categories just need the values to return all in case "All" categories are selected where no specific category is selected. Colour coded text for what the calc is referring to. I just need an option in case "All" is selected rather than a specific category.