How to change the code so it compares to a different column?

Romano_odK

Active Member
Joined
Jun 4, 2020
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Good morning,

I got this code from Peter and I got it working finally. Now the only thing I would really like is for the code is to compare between column [Verkoopprijs] (colomn 3) and [Backup Verkoopprijs] (column 38) in the table. I really do not understand a bit of this code so does anyone know how to do this?

Thank you for your time.

Romano


VBA Code:
With Range("Table_Query_from_A100[Verkoopprijs]")
    .Value = Evaluate(Replace("if(#=" & .Offset(, 1).Address & ",True,#)", "#", .Address))
  End With
  With Range("Table_Query_from_A100[#All]")
    .AutoFilter Field:=3, Criteria1:="TRUE"
    If .Columns(1).SpecialCells(xlVisible).Count > 1 Then .Offset(1).Resize(.Rows.Count - 1).EntireRow.Delete
    .AutoFilter Field:=3
  End With
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,429
Messages
6,124,841
Members
449,193
Latest member
MikeVol

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top