recherche formule ("recherche" ou autre...)

mary1

XLDnaute Junior
bonjour,
j'ai un petit souci avec une formule:
je veux rentrer la formule sur le doc "an2"
---je cherche dans "an1" si la lettre (a,b,c,ou d….) se trouve dans "an2"

ex:
"m" n'est pas dans "an2" donc afficher dans la colonne B (du doc an2) une formule permettant d'otenir "m")

ci joint les doc "an2" et "an1" pour une meilleure comprehension

merci d'avance du coup de pouce:eek:
 

Pièces jointes

  • an1.xls
    13.5 KB · Affichages: 69
  • an2.xls
    13.5 KB · Affichages: 61
  • an1.xls
    13.5 KB · Affichages: 63
  • an2.xls
    13.5 KB · Affichages: 63
  • an1.xls
    13.5 KB · Affichages: 66
  • an2.xls
    13.5 KB · Affichages: 63

mary1

XLDnaute Junior
Re : recherche formule ("recherche" ou autre...)

bonjour tototiti2008,

je te donne un autre exemple peut etre que ca sera plus clair :

en 2007:
(colonne A)
a
b
c

en 2006:
(colonne A)
b
m
r

je cherche à rentrer une formule dans 2007
(en colonne B)
dans cette formule je veux qu'à la fin du compte il m'affiche les éléments qu'il y a en 2006 qui ne sont pas présent en 2007, ce qui donne:

feuille 2007:
(colonne B)
m
r
 

mary1

XLDnaute Junior
Re : recherche formule ("recherche" ou autre...)

"an1" c'est la macro qui l'ouvre!


Avec la macro ci-dessous il m'affiche les cellules identiques, alors que je cherche l'inverse!
Sub test2()
Application.ScreenUpdating = False
Workbooks.Open (ThisWorkbook.Path & "\" & "an1.xls")
tablo = Sheets("Feuil1").Range("A2:A" & Sheets("Feuil1").Range("A65536").End(xlUp).Row)
Workbooks("an2.xls").Activate
Range("C2:C65536").ClearContents
For n = 2 To Range("A65536").End(xlUp).Row
For m = LBound(tablo, 1) To UBound(tablo, 1)
If Range("A" & n) = tablo(m, 1) Then
Range("C" & n) = Range("A" & n)
ID = True
End If
Next m
If ID = False Then Range("C" & n) = ""
ID = False
Next n
Application.ScreenUpdating = True
End Sub
 

tototiti2008

XLDnaute Barbatruc
Re : recherche formule ("recherche" ou autre...)

Voilà une solution :
 

Pièces jointes

  • an1.xls
    15.5 KB · Affichages: 49
  • an2.xls
    26 KB · Affichages: 50
  • an1.xls
    15.5 KB · Affichages: 49
  • an2.xls
    26 KB · Affichages: 62
  • an1.xls
    15.5 KB · Affichages: 51
  • an2.xls
    26 KB · Affichages: 49

Discussions similaires

Statistiques des forums

Discussions
313 344
Messages
2 097 337
Membres
106 916
dernier inscrit
Soltani mohamed