Topic Options
#7614 - 09/26/06 10:59 AM Error on .RangeDept Financial Statement
Ken A. Offline
Adagio Maestro

Registered: 09/14/01
Posts: 1009
Loc: Kamloops, BC
I have set up a financial statement using .RangeDept. When the report is expanded it works fine except the first row of data is all errors. The problem appears to be related to the fact that their are accounts (b/s) that do not have a department. I am only looking at i/s accounts but still think this may be the problem.

The key cells have the following in them when collapsed and expanded respectively:

Collapsed

A11 .RangeDept
B11 4000:9999-*
C11 has the formula "=TRIM(MID($B11,FIND("-",$B11,1)+2,LENGTH($B11)))" and returns the value "*"
D11 has the formula "=IF(TRIM($C11)=="*","Consolidated",IF(TRIM($C11)=="`",TRIM(DEPARTMENT(1)),PROPER(ADGET("gldept.desc",$C11))))" and returns "Consolidated"

Expanded

Row 11 is hidden

A12 '||** Generated Row **||
B12 4000:9999-
C12 has the formula =TRIM(MID($B12,FIND("-",$B12,1)+2,LENGTH($B12)))" and returns the value "Error!"
D12 has the formula ==IF(TRIM($C12)=="*","Consolidated",IF(TRIM($C12)=="`",TRIM(DEPARTMENT(1)),PROPER(ADGET("gldept.desc",$C12))))" and returns "Error!"

A13 '||** Generated Row **||
B13 4000:9999-100
C13 has the formula =TRIM(MID($B12,FIND("-",$B12,1)+2,LENGTH($B12)))" and returns the value "100!"
D13 has the formula ==IF(TRIM($C12)=="*","Consolidated",IF(TRIM($C12)=="`",TRIM(DEPARTMENT(1)),PROPER(ADGET("gldept.desc",$C12))))" and returns the correct department name

Any thoughts on how to get rid of this first error row?
_________________________
Thanks,

Ken Aberdeen,CPA, CMA
Aberdeen Business Consulting Ltd.
ken@aberdeenconsulting.ca

Top
#7615 - 09/26/06 11:56 AM Re: Error on .RangeDept Financial Statement
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11550
Loc: Vancouver, BC Canada
Hi Ken,

The reason you are getting the error in Cell C11 for the 'blank' department is because the results of the cell in column B has no characters after the - thus null is getting returned for the function (or Error).

Thus you can do a check with an IF statement to see if - is the last character:
=IF(RIGHT($B11,1)!="-",MID($B11,FIND("-",$B11,1)+2,LENGTH($B11)),"")

This gets rid of the errors for both cells. But you'll need to come up with something for column D to print some description when the Dept code is blank:
=IF(TRIM($C11)=="*","Consolidated",IF(TRIM($C11)=="`",TRIM(DEPARTMENT(1)),IF($C11=="","Desc",PROPER(ADGET("gldept.desc",$C11)))))

Of course, replace "Desc" with what you want.
_________________________
Regards,
Softrak Tech Support

Top
#7616 - 09/26/06 12:24 PM Re: Error on .RangeDept Financial Statement
Ken A. Offline
Adagio Maestro

Registered: 09/14/01
Posts: 1009
Loc: Kamloops, BC
Perfect!

Thanks for you usual excellent help.
_________________________
Thanks,

Ken Aberdeen,CPA, CMA
Aberdeen Business Consulting Ltd.
ken@aberdeenconsulting.ca

Top


Moderator:  Christa_Meissner 
Who's Online
1 registered (1 invisible), 120 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14467 Topics
70662 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30