# If and or nested

#### David_UK

##### Active Member
Quick one with regards the way I have nested these.

in A4 = Won b4= £20
in A5 = Placed b4=£10

=IF(A4="Won"+OR(A4="Placed"+AND(A5="Won"+OR(A5="Placed"))),B4:B5,0)

Can anyone help. Also while you're at it, does anyone know how to create a button that will be docked in the standard toolbar, what I need is a Macro button, I know how to assign a macro to a normal button, but don't know how to dock it and keep it there like a standard button.

Cheers.

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

#### just_jon

##### Legend
Guessing --

=IF(OR(A4="Won",AND(A4="Placed",OR(A5="Won",A5="Placed"))),SUM(B4:B5),0)

##### Well-known Member
Hello,

Do you mean you want to add a button on the toolbar?

select VIEW-->TOOLBARS-->CUSTOMIZE

select the COMMANDS tab

Click on any COMMAND ICON (e.g. SAVE), drag this into the toolbar.

Then Right click the mouse on this new button, and you can assign macro, change the image etc.

Is this what you are asking?

#### David_UK

##### Active Member
Thanks matey, any ideas on how to dock a macro button on the standard toolbar then?

##### Well-known Member

Hello,

What exactly do you mean by a 'macro button'?

What is this macro button for?

#### Joe4

You can create a Custom button to put in your toolbar and attach a macro to it. If you put your macro in your personal.xls workbook, then that button/macro will be available whenever you are in Excel. Otherwsie, it will only work if the file containing your macro is open.

#### David_UK

##### Active Member
Thanks mate, sorted it now...

Cheers all,

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,024
Messages
5,856,881
Members
431,837
Latest member
megantang

### 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.

### Which adblocker are you using?

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

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