If statement

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
At the moment I have a formula which is

=MAX(IF((LEFT(Wallboard!$A$2:$A$534038,13)) ="Mon Jun 27 10",Wallboard!$E$2:$E$534038),0) - MAX(IF((LEFT(Wallboard!$A$2:$A$534038,13)) ="Mon Jun 27 09",Wallboard!$E$2:$E$534038),0)


What I want to do is replace the "Mon Jun 27 10" part with 2 things.

Instead I would like it to say if Left(ref, 3) = A12 and if Mid(ref,12,2) = D11

and similarly for "Mon Jun 27 09"

I think it should be something like

=MAX(IF((LEFT(Wallboard!$A$2:$A$534038,3))=A12,IF((MID(Wallboard!$A$2:$A$534038,12,2))=D11,Wallboard!$E$2:$E$534038),0)-MAX(IF((LEFT(Wallboard!$A$2:$A$534038,3))=A12,IF((MID(Wallboard!$A$2:$A$534038,12,2))=E11,Wallboard!$E$2:$E$534038),0)))
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
At the moment I have a formula which is

=MAX(IF((LEFT(Wallboard!$A$2:$A$534038,13)) ="Mon Jun 27 10",Wallboard!$E$2:$E$534038),0) - MAX(IF((LEFT(Wallboard!$A$2:$A$534038,13)) ="Mon Jun 27 09",Wallboard!$E$2:$E$534038),0)


What I want to do is replace the "Mon Jun 27 10" part with 2 things.

Instead I would like it to say if Left(ref, 3) = A12 and if Mid(ref,12,2) = D11

and similarly for "Mon Jun 27 09"

I think it should be something like

=MAX(IF((LEFT(Wallboard!$A$2:$A$534038,3))=A12,IF((MID(Wallboard!$A$2:$A$534038,12,2))=D11,Wallboard!$E$2:$E$534038),0)-MAX(IF((LEFT(Wallboard!$A$2:$A$534038,3))=A12,IF((MID(Wallboard!$A$2:$A$534038,12,2))=E11,Wallboard!$E$2:$E$534038),0)))
Try this...

Array entered**:

=MAX(IF(LEFT(Wallboard!$A$2:$A$534038,3)=A12,IF(MID(Wallboard!$A$2:$A$534038,12,2)=D11,Wallboard!$E$2:$E$534038)))-MAX(IF(LEFT(Wallboard!$A$2:$A$534038,3)=A12,IF(MID(Wallboard!$A$2:$A$534038,12,2)=E11,Wallboard!$E$2:$E$534038)))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

I imagine that's kind of slow to calculate.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

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