![]() |
#1
|
|||
|
|||
![]()
I want to do a VBA code for the following situation :
(For instance let s do with the ISINcode Sheet2 « AT0000386198 ») Si colAI(Feuil2) >colF(feuil1) (we need to compare the valor for the same Identifier AT00003861989 And if colAI(Feuil2)>colAZ(Feuil2) (pas grave si AY vide) Sub Cedola() Dim cel As Range 'déclare la variable cel (CELlule) Dim pl As Range 'déclare la variable pl (PLage) Dim r As Range 'déclare la variable r (Recherche) Dim ca As Double 'déclare la variable ca (CAlcul) Set pl = Sheets("Fontedati1").Range("A3:A" & Sheets("Fontedati1").Range("A65236").End(xlUp).Row ) 'définit la plage pl For Each cel In pl 'boucle sur toutes les cellules cel de la plage pl 'déinit la recherche Set r = Sheets("FonteMovimentazione1").Columns(1).Find(cel .Value, , xlValues, xlWhole) 'recherche dans la colonne A de l'onglet "Feuil1" la valeur de la cellule cel If Not r Is Nothing Then 'condition 1 : si il existe au moins une occurrence 'condition 2 : si la colonne AI de cel est supérieure à la colonne F de r et si la colonne AI de cel est supérieure à la colonne AY de cel If cel.Offset(0, 34).Value > r.Offset(0, 5).Value And cel.Offset(0, 34).Value > cel.Offset(0, 50) Then This part above is ok What i want to do: Then 1. Take the date in AI sheet2 as reference (15.07.10) which correpons to the col AI for the code AT0000386198 2 Go on sheet 3 in CW corresponding to 15.07.10(col CS) and do a copy paste « valor » of all the series in CW (from CW (15.07.10) up to CW117(fix)) 3.CV47=CV47(CW (15.07.10)-1) 4.Copy AI(Sheet2) in AZ (Sheet2) Still for the AT0000386198 And we do this in a loop scanning all the ISIN code in sheet2 Thank you very much for help |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Email signatures in Outlook do not match? | Phil_C | Outlook | 0 | 11-23-2010 10:56 AM |
![]() |
Theofficehedgehog | Excel | 3 | 07-26-2009 02:07 PM |
Need another formula to match my last one | tinkertron | Excel | 2 | 04-29-2009 02:17 PM |
new appointment date always reverts back to today's date | msills | Outlook | 0 | 08-24-2007 08:57 AM |
![]() |
promark | Outlook | 1 | 12-23-2005 07:21 AM |