

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
8 messages in org.openoffice.fr.progfonction Min et la recherche sous calc| From | Sent On | Attachments |
|---|---|---|
| jamila hafyd | Jun 24, 2006 3:05 am | |
| christianwtd | Jun 24, 2006 5:32 am | |
| jamila hafyd | Jun 26, 2006 3:35 am | |
| Mathias Michel | Jun 26, 2006 4:20 am | |
| jamila hafyd | Jun 26, 2006 4:59 am | |
| Francois Gatto | Jun 26, 2006 3:21 pm | |
| Francois Gatto | Jun 27, 2006 1:08 pm | |
| Francois Gatto | Jun 27, 2006 2:22 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | fonction Min et la recherche sous calc | Actions... |
|---|---|---|
| From: | jamila hafyd (mail...@yahoo.fr) | |
| Date: | Jun 24, 2006 3:05:38 am | |
| List: | org.openoffice.fr.prog | |
Bonjour liste
j'essaie de programmer un macro sous calc qui fait la comparaison entre des prix et il me color la valeur minimale dans chaque ligne Le code que j'ai écrit est le suivant
Sub chercherminetcolorer()
oDoc = ThisComponent oSheet=oDoc.Sheets.getByName("Feuille1") Rem ********** determiner la zone de rechreche For y = 1 to 100 mazone = oSheet.getCellRangeByName("A" & y & ":D" & y)
xzone = "A" & y & ":D" & y
if oSheet.getCellRangeByName("A" & y).String = "" then Exit For
mazone.CellBackColor = RGB(255,255,255)
jecherche = mazone.CreateSearchDescriptor
jecherche.SearchString=(MonMin("Feuille1",xx))
trouve = mazone.findAll(jecherche)
for x=0 to trouve.count-1 trouve(x).CellBackColor = RGB(255,200,255) next Next
End sub
Function MonMin(UneFeuille As Variant, xzone As Variant ) as double
Dim LaFonc As Object ,LesFeuilles As Object,LaFeuille As Object , LeRange As Object, Result As String LaFonc=createunoservice("com.sun.star.sheet.FunctionAccess") 'Les donnees sources LesFeuilles=ThisComponent.sheets() LaFeuille=LesFeuilles.getbyname("Feuille1") LeRange=LaFeuille.getcellrangebyName(xzone)
'Arguments de la fonction dim Arguments(0) arguments(0)=LeRange result=lafonc.callfunction("MIN",arguments()) MonMin=result End function
Généralement j'ai arrivé au resultat que je veux mais j'ai teois probèlme :
1 _ Comment faire pour faire la recherche dans une zone indetérminé ( seulement dans les lignes remplis)
2 _ Mon macro ne prend pas on considération les chiffres aprés la virgule ( par exemple mon marco ne fait pas la différence entre les deux nombre 120.31 et 120.56 ) 3 _ Si ma valeur minimale est 10 il va me colorer tout les nombre qui contient le chiffre 10)
J'éspere que j'etais claire Merci d'avance
HAFYD Jamila
---------------------------------
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son
interface révolutionnaire.







