Spreadsheet: 130258d1322143113-how-do-i-multiply-based-on-2-column-criteria-times-2-or-4
Sheet: Drain runs 

 | gully workings |  |  |  |  |  |  |  | rocker spigot details |  |  | order length calcs | junction details |  |  |  |  |  |  |  | junction details |  |  |  |  |  |  |  | junction details |  |  |  |  |  |  |  | junction details |  |  |  |  |  |  |  | junction details |  |  |  |  |  |  |  | junction details
 |  |  |  |  |  |  |  |  | Rocker and spigot lengths |  |  | effect pipe length lees rocker jct etc |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe |  |  |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe |  |  |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe |  |  |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe |  |  |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe |  |  |  |  |  |  | [NAME] off main pipe | no of junction on this one pipe
 | Drain runs |  |  |  |  |  |  |  | 2no per run for each so below x 4 |  |  | less 600 for spig sock rocker jct etc |  |  |  |  |  | amount |  | [put type |  |  |  |  |  | amount |  | [put type |  |  |  |  |  | amount |  | [put type |  |  |  |  |  | amount |  | [put type |  |  |  |  |  | amount |  | [put type |  |  |  |  |  | amount |  | [put type
 |  |  |  |  |  |  |  |  | Effective length |  |  | less 5m & junctiosn |  |  |  | hide |  | 0, 1 or 2 | hide | in validation |  |  |  | hide |  | 0, 1 or 2 | hide | in validation |  |  |  | hide |  | 0, 1 or 2 | hide | in validation |  |  |  | hide |  | 0, 1 or 2 | hide | in validation |  |  |  | hide |  | 0, 1 or 2 | hide | in validation |  |  |  | hide |  | 1 or 2 | hide | in validation
 | gully type | gully grating |  | From | dia | to | Material | length | 0.6 | 1 | 1.25 | no of pipes (=length less rocker, soc spig) | jcts |  |  |  |  |  |  | type | jcts |  |  |  |  |  |  | type | jcts |  |  |  |  |  |  | type | jcts |  |  |  |  |  |  | type | jcts |  |  |  |  |  |  | type | jcts |  |  |  |  | a |  | type
 |  |  |  | F15 | 0.15 | Gully | Clay | 11 |  |  |  |  |  |  | x |  |  | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 2 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0
 |  |  |  | F16 | 0.15 | F18 | Clay | 5 |  |  |  |  |  |  | x |  |  | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 2 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0
 |  |  |  | F17 | 0.15 | [NAME] | Clay | 7 |  |  |  |  |  |  | x |  |  | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 2 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0
 |  |  |  | F18 | 0.15 | F19 | Clay | 32 |  |  |  |  |  |  | x |  |  | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 2 |  |  |  |  | x |  | 0.15 | 0 |  |  |  |  | x |  | 0.15 | 0
 |  |  |  | In the M column I need the calculation to be dependent on columns E & G
 |  |  |  | At the moment I have had to adjust it by hand, but it should be
 |  |  |  | If either E or G contain a BLANK, Gully or [NAME] the formula needs to multiply by 2
 |  |  |  | you can see the formula in M6, M7 & M8
 |  |  |  | However if these cells don’t contain any of these it needs to multiply by 4
 |  |  |  | as in cell M9
 |  |  |  |  |  |  |  |  | Compare these > |  |  | TMS |  | Marcol |  | Your result