Help with Formula

imback2nite

Board Regular
Joined
Oct 30, 2004
Messages
203
Office Version
  1. 2003 or older
Platform
  1. Windows
Can anyone help with this formula? The Formula on top works but the bottom Formula gives me an error and highlights the CELL in the last phrase. I've been working on it for awhile and barely have any hair left! Can anyone tell me why? Is it too long?

Excel Formula:
=IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AV$1,$AV$2=TRUE),'Quarterly Report'!$AV$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AW$1,$AW$2=TRUE),'Quarterly Report'!$AW$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AX$1,$AX$2=TRUE),'Quarterly Report'!$AX$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))="ri",$AV$1="i",$AV$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))="ri",$AW$1="i",$AW$2=TRUE),"ri","")))))


Excel Formula:
=IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AV$1,$AV$2=TRUE),'Quarterly Report'!$AV$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AW$1,$AW$2=TRUE),'Quarterly Report'!$AW$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))='Quarterly Report'!$AX$1,$AX$2=TRUE),'Quarterly Report'!$AX$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))="ri",$AV$1="i",$AV$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))="ri",$AW$1="i",$AW$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",O12))="ri",$AW$1="i",$AW$2=TRUE),"ri","")))))
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Apologies, THIS formula gets the Error message.

Excel Formula:
=IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AV$1,$AV$2=TRUE),'Quarterly Report'!$AV$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AW$1,$AW$2=TRUE),'Quarterly Report'!$AW$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AX$1,$AX$2=TRUE),'Quarterly Report'!$AX$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AV$1="i",$AV$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AW$1="i",$AW$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AX$1="i",$AX$2=TRUE),"ri","")))))
 
Upvote 0
In both cases, it looks like you're missing a closing bracket ")" at the end.
 
Upvote 0
In both cases, it looks like you're missing a closing bracket ")" at the end.
Yes. Yes it does. When I input the formula, excel says or points to the CELL function in the last phrase or IF function. But when I get rid of the fifth phrase and leave the sixth phrase, excel takes it and it's fine. There are only 6 nested functions so ... I don't get it.
 
Upvote 0
Yes. Yes it does. When I input the formula, excel says or points to the CELL function in the last phrase or IF function. But when I get rid of the fifth phrase and leave the sixth phrase, excel takes it and it's fine. There are only 6 nested functions so ... I don't get it.
Well, this seems to work. It's not a nice looking formula but it works...for now. I added the & and then input the rest of the formula. I guess excel thought I had gone over the number of functions I am able to use. ?‍♂️

Excel Formula:
=IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AV$1,$AV$2=TRUE),'Quarterly Report'!$AV$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AW$1,$AW$2=TRUE),'Quarterly Report'!$AW$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))='Quarterly Report'!$AX$1,$AX$2=TRUE),'Quarterly Report'!$AX$1,IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AV$1="i",$AV$2=TRUE),"ri",IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AW$1="i",$AW$2=TRUE),"ri","")))))&IF(AND(INDIRECT("'"&$AV$4&"'!"&CELL("address",B12))="ri",$AX$1="i",$AX$2=TRUE),"ri","")
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

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