# If Statement

#### ndello

##### Active Member
Hi please see my if statement below:
=IF('monthly cover'!K3="January",'broker summary'!B12*-1,IF('monthly cover'!K3="February",'broker summary'!C12*-1,IF('monthly cover'!K3="March",'broker summary'!D12*-1,IF('monthly cover'!K3="April",'broker summary'!E12*-1,IF('monthly cover'!K3="May",'broker summary'!F12*-1,IF('monthly cover'!K3="June",'broker summary'!G12*-1,IF('monthly cover'!K3="July",'broker summary'!H12*-1,IF('monthly cover'!K3="August",'broker summary'!I12*-1,"0"))))))))

Is there any way to continue on to the rest of the months. It will not allow me to go past the eight months, I assume.

Thank you for the assistance.
Neil

### Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the \$ sign).

#### Iridium

##### Well-known Member
As far as I know a formula is limited to seven levels of nested functions so you may be looking for a VBA solution if you want any more - my VBA is a bit too shaky to offer any help with that

#### Cam

##### Board Regular
Hi

Someone may have a nicer looking solution but this should operate properly under your conditions.

=SUMPRODUCT(('monthly cover'!K3={"january","february","march","april","may","june","july","august","september","october","november","december"})*({'broker summary'!B12,'broker summary'!C12,'broker summary'!D12,'broker summary'!E12,'broker summary'!F12,'broker summary'!G12,'broker summary'!H12,'broker summary'!I12,'broker summary'!J12,'broker summary'!K12,'broker summary'!L12,'broker summary'!M12}))

#### ndello

##### Active Member
Cam, thanks but it did not work. The first broker is lighting up as an error.
Also, will this add the total, because I am trying to select the correct cell to use.

##### MrExcel MVP
On 2002-10-18 10:47, ndello wrote:
Hi please see my if statement below:
=IF('monthly cover'!K3="January",'broker summary'!B12*-1,IF('monthly cover'!K3="February",'broker summary'!C12*-1,IF('monthly cover'!K3="March",'broker summary'!D12*-1,IF('monthly cover'!K3="April",'broker summary'!E12*-1,IF('monthly cover'!K3="May",'broker summary'!F12*-1,IF('monthly cover'!K3="June",'broker summary'!G12*-1,IF('monthly cover'!K3="July",'broker summary'!H12*-1,IF('monthly cover'!K3="August",'broker summary'!I12*-1,"0"))))))))

Is there any way to continue on to the rest of the months. It will not allow me to go past the eight months, I assume.

Thank you for the assistance.
Neil

Is

=-INDEX('monthly cover'!B12:M12,MATCH('monthly cover'!K3,{"January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December"},0))

what you're looking for?
This message was edited by Aladin Akyurek on 2002-10-18 11:21

#### ndello

##### Active Member
How about this, I want to say: If cell m12 is equal to zero, move left until you find a number not equal to zero and show that number. Can this be done?
Thanks
Neil

#### ndello

##### Active Member
The index worked great.

Thank you all for your assistance. woo hoo

Neil

Replies
14
Views
569
Replies
2
Views
248
Replies
8
Views
854
Replies
3
Views
161
Replies
3
Views
301

1,181,687
Messages
5,931,442
Members
436,790
Latest member
aelbaitam

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

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