If Statement

ndello

Active Member
Joined
Oct 16, 2002
Messages
382
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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Iridium

Well-known Member
Joined
Jul 15, 2002
Messages
2,831
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
Joined
May 29, 2002
Messages
167
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
Joined
Oct 16, 2002
Messages
382
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209

ADVERTISEMENT

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
Joined
Oct 16, 2002
Messages
382
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
Joined
Oct 16, 2002
Messages
382
The index worked great.

Thank you all for your assistance. woo hoo

Neil
 

Forum statistics

Threads
1,143,614
Messages
5,719,719
Members
422,242
Latest member
hishamkhatri

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
Top