|
|
Joined: Sep 2001
Posts: 1,028
Adagio Maestro
|
|
Adagio Maestro
Joined: Sep 2001
Posts: 1,028 |
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
|
|
|
|
|
Joined: Mar 1999
Posts: 11,746
Adagio Action Team
|
|
Adagio Action Team
Joined: Mar 1999
Posts: 11,746 |
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
|
|
|
|
|
Joined: Sep 2001
Posts: 1,028
Adagio Maestro
|
|
Adagio Maestro
Joined: Sep 2001
Posts: 1,028 |
Perfect!
Thanks for you usual excellent help.
Thanks,
Ken Aberdeen,CPA, CMA Aberdeen Business Consulting Ltd. ken@aberdeenconsulting.ca
|
|
|
|
0 members (),
71
guests, and
3
robots. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Forums5
Topics14,679
Posts71,625
Members1,874
| |
Most Online1,408 Dec 9th, 2025
|
|
|
S |
M |
T |
W |
T |
F |
S |
|
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
|
|
|
|
|
|
|
|
|