How do I disable anchors in my address?

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
712
Office Version
  1. 2016
Platform
  1. Windows
The below is adding anchors which is throwing me off when I sort.

An example of the final output is =IF(TODAY()-$N$822>10,"Expired",TODAY()-$N$822)
I need it to be =IF(TODAY()-N822>10,"Expired",TODAY()-N822)

VBA Code:
    Dim LastRow As Long
    LastRow = Cells(Rows.Count, "V").End(xlUp).Row
        
    Dim i As Long
    
    For i = 2 To LastRow
    
    If Range("V" & i) = "" Then
    Range("V" & i) = "No"
    Range("W" & i) = "=IF(TODAY()-" & Range("N" & i).Address & ">10,""Expired"",TODAY()-" & Range("N" & i).Address & ")"
    End If
    
    If Range("V" & i) = "Yes" Then
    Range("W" & i) = ""
    End If
    
    Next
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
You can use Range("N" & i).Address(0,0)
 
Upvote 0
Solution
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,203,760
Messages
6,057,210
Members
444,914
Latest member
Mamun12345

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