perfect!
perfect!
Q of DETTAGLIO_CARICO is completely blank, is that correct?
Ok try this:
Option Explicit Sub CompareData() Dim x As Long Dim LastRow As Long Dim c As Range Dim CheckValue As Double Application.ScreenUpdating = False LastRow = Sheets("IMPAGATI").Range("D65536").End(xlUp).Row For x = 3 To LastRow CheckValue = Sheets("IMPAGATI").Range("D" & x).Value With Sheets("DETTAGLIO_CARICO").Range("D:D") Set c = .Find(What:=CheckValue, LookIn:=xlValues, LookAt:=xlWhole) End With If Not c Is Nothing Then Sheets("IMPAGATI").Range("L" & x).Value = _ Sheets("DETTAGLIO_CARICO").Range("Q" & x).Value End If Application.StatusBar = "Calculating: " & x & " of " & _ LastRow & " < " & Format(x / LastRow, "Percent") & " > " Next x Application.StatusBar = False Application.ScreenUpdating = True End Sub
But your macro delete the value in column L of IMPAGATI, i would wont ....
if the same number IN column D OF DETTAGLIO_CARICO is present IMPAGATI copy the relative value of the column L of IMPAGATI in column Q of DETTAGLIO_CARICO
I dont really understand. Maybe you need to switch the line that changes the values. Try this:
Option Explicit Sub CompareData() Dim x As Long Dim LastRow As Long Dim c As Range Dim CheckValue As Double Application.ScreenUpdating = False LastRow = Sheets("IMPAGATI").Range("D65536").End(xlUp).Row For x = 3 To LastRow CheckValue = Sheets("IMPAGATI").Range("D" & x).Value With Sheets("DETTAGLIO_CARICO").Range("D:D") Set c = .Find(What:=CheckValue, LookIn:=xlValues, LookAt:=xlWhole) End With If Not c Is Nothing Then Sheets("DETTAGLIO_CARICO").Range("Q" & x).Value = _ Sheets("IMPAGATI").Range("L" & x).Value End If Application.StatusBar = "Calculating: " & x & " of " & _ LastRow & " < " & Format(x / LastRow, "Percent") & " > " Next x Application.StatusBar = False Application.ScreenUpdating = True End Sub
BIG! Sorry for my english. It work naturally...
No problem. So is this code working fine for you now or do we need to do something else?
Nothing in this time many tks, tomorrow i go in vacation and you? If yor vacation time you go in Italy, to Napoli, tell me, i offer you a big pizza and a deliciuos caffe';-)
Sounds good to me.
Take Care
Originally Posted by DRJHi, DRJ and All...
i am back to the vacation...
The first choice of this day it has been to one greet to you.
http://www.erlandsendata.no/download...barcontrol.zip
My dear i have dowloded this utility (i am interessed only for StartProcessing1) and i would want to integrate in your acript, have you a time for me?
My macro is located in modulo1
I have re-attache my initial wbook with your modify.
Tks
if you heva a little time for me see my last post on this discussion...Originally Posted by DRJ
Tks.
Sal