OVH Cloud OVH Cloud

Formule Excel en VBA

1 réponse
Avatar
Philippe W.
Bonjour Voici la formule en VBA qui marche

ActiveCell.FormulaR1C1 =
"=IF(ISERROR(MATCH(""01.4"",Data_Site)),"""",INDEX(Data,MATCH(""01.4"",DataS
ite)))"

Maintenant, j'aimerais remplacer la valeur "0.1.4" par une "variable" qui
est:

ActiveCell.Comment.Text


Je n'arrive pas a mettre ma variable dans la formule tout en respectant la
methode de FormulaR1C1


Tout aide serait bien apprécié

Merci !

1 réponse

Avatar
AV
C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_00FB_01C53A11.8B96D460
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


x = ActiveCell.Comment.Text
ActiveCell = "=if(iserror(match(""" & x & """,data_site)),"""",index(data,match(""" & x & """,data_site)))"

AV

------=_NextPart_000_00FB_01C53A11.8B96D460
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY><FONT face=Arial size=2>
<DIV><BR><FONT size=1>x = ActiveCell.Comment.Text<BR>ActiveCell =
"=if(iserror(match(""" &amp; x &amp; """,data_site)),"""",index(data,match("""
&amp; x &amp; """,data_site)))"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>AV</DIV></FONT></BODY></HTML>

------=_NextPart_000_00FB_01C53A11.8B96D460--