Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have a macro that runs and it ends up having to delete row 2 on 2 different sheets, which I do with..... which I am only showing a portion to make it short and easy. This causes a problem is it causes my named range to have a #REF where it used to say $B$2. With .Worksheets("BO Ref List") .Range("A1").PasteSpecial .Columns("A:B").RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes .Range("A2:B2").Delete Shift:=xlUp With .Worksheets("FO Ref List") .Range("A1").PasteSpecial .Columns("A:B").RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes .Range("A2:B2").Delete Shift:=xlUp Here is the actual formula in my named range.... BOAssociate "=OFFSET('BO Ref List'!$B$2,0,0,COUNTA('BO Ref List'!$B$2:$B$989),1)" FOAssociate "=OFFSET('FO Ref List'!$B$2,0,0,COUNTA('FO Ref List'!$B$2:$B$985),1)" I have attempted using a few different things, but I am drawing a blank when it comes to writing it into my macro to have it change the named range back to the above. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I change the reference to a named range via VBA? | Excel Programming | |||
Change the value of particular cells in a Named Range | Excel Programming | |||
change named range | Excel Programming | |||
Via code, making 2 named Ranges Indentical, upon change | Excel Programming | |||
Change named range value | Excel Programming |