Bonjour,

j'utilise le code ci-après qui est fonctionnel :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
31
32
33
34
35
36
37
38
39
40
//Identification des éléments de l'actif circulant
if (Text.Start(Text.From([Compte]),2)="33") and [Solde]<0 then "Actif Circulant" else 
if(Text.Start(Text.From([Compte]),2)="39") and [Solde]>0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="40") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="41") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="42") and [Solde]<0 then "Actif Circulant" else 
if(Text.Start(Text.From([Compte]),2)="43") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="44") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="45") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="46") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="47") and [Solde]<0 then "Actif Circulant" else
if(Text.Start(Text.From([Compte]),2)="48") and [Solde]<0 then "Actif Circulant"
 else
if(Text.Start(Text.From([Compte]),3)="490") and [Solde]>0 then "Actif Circulant" else 
if(Text.Start(Text.From([Compte]),3)="491") and [Solde]>0
then "Actif Circulant" else 
if(Text.Start(Text.From([Compte]),3)="497") and [Solde]>0
then "Actif Circulant"
   else 
 
//Identification des éléments du Passif Circulant
 
if (Text.Start(Text.From([Compte]),2)="33") and [Solde]>0 then "Passif Circulant" else 
if(Text.Start(Text.From([Compte]),2)="39") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="40") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="41") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="42") and [Solde]>0 then "Passif Circulant" else 
if(Text.Start(Text.From([Compte]),2)="43") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="44") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="45") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="46") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="47") and [Solde]>0 then "Passif Circulant" else
if(Text.Start(Text.From([Compte]),2)="48") and [Solde]>0 then "Passif Circulant"
 else
if(Text.Start(Text.From([Compte]),3)="490") and [Solde]<0 then "Passif Circulant" else 
if(Text.Start(Text.From([Compte]),3)="491") and [Solde]<0
then "Passif Circulant" else 
if(Text.Start(Text.From([Compte]),3)="497") and [Solde]< 0 then "Passif Circulant" else 
if(Text.Start(Text.From([Compte]),3)="499") and [Solde]> 0 then "Passif Circulant" 
   else " "
Auriez-vous une solution pour l'optimiser, car j'imagine que cela peut-être raccourci ?

Merci d'avance