I've tried searching for a solution to this problem, but all google results are fairly fruitless, at least with my search terms.
Is there some option/IDE/page that will automatically format a multi function excel formula to a more human readable layout? Either in Excel or outside?
Currently I have a several =if(and(if(and())if(and()))) statements that gumm up the legibility and was wondering if there is a solution for this.
The formula is as follows:
=IF(AND(IFERROR(INDEX(INDIRECT("Truck"&A72),5,5),"")<>"-",IFERROR(INDEX(INDIRECT("Truck"&A72),5,5),"")>0,INDEX(INDIRECT("Truck"&A72),4,1)="rig"),IFERROR(INDEX(INDIRECT("Truck"&A72),4,3),"")&" - "&IFERROR(INDEX(INDIRECT("Truck"&A72),3,3),""),IF(AND(IFERROR(INDEX(INDIRECT("Truck"&A72),5,5),"")="",INDEX(INDIRECT("Truck"&A72),4,1)="rig"),"",IF(AND(INDEX(INDIRECT("Truck"&A72),4,1)="pickup",IFERROR(INDEX(INDIRECT("Truck"&A72),6,3),"")<>"-"),IFERROR(INDEX(INDIRECT("Truck"&A72),6,3),""),IF(AND(INDEX(INDIRECT("Truck"&A72),4,1)="pickup",IFERROR(INDEX(INDIRECT("Truck"&A72),5,5),"")="-"),"",IF(1=1,IFERROR(INDEX(INDIRECT("Truck"&A72),4,3),"")&" - "&IFERROR(INDEX(INDIRECT("Truck"&A72),3,3),""),IFERROR(INDEX(INDIRECT("Truck"&A72),4,3),"")&" - "&IFERROR(INDEX(INDIRECT("Truck"&A72),3,3),""))))))
Looking at this it may be easier to refractor into VBA then continue along this path of If-Ands. But I don't anticipate many more, if any, conditions.
The gist is: The formula looks at cells to see if value has been applied to them, and will return the desired cells information based on that. Basically If a truck is a 'rig' and has weight, the Customer and Name will be returned, otherwise blanks are returned.
This particular formula is gathering information for a printable document that I can give to my loading crews in the evening, so they can pack it for delivery tomorrow. Im trying to automate my Job a bit. Because otherwise its all paper and pen here.
Thank you.
I took your ?beautiful? formula an entered it into a cell. Then I clicked in the formula bar and positioned the cursor before some of the IFERROR
's. I then touched Alt + Enter. I then increased the width of the formula bar.
This does not affect the functionality of the formula, but does affect the formatting in the formula bar: