VBA Absolute reference not working...

leatherhen99

New Member
Joined
Dec 17, 2019
Messages
27
Office Version
  1. 365
Platform
  1. Windows
Today has been one of those days! Can someone help?!?

I am referencing a pivottable on another sheet...

This formula:

VBA Code:
ActiveCell.FormulaR1C1 = "=iferror(index('" & PSheet.Name & "'!r4c3:r" & LastRow & "c" & LastCol & ",match(rc[-1],'" & PSheet.Name & "'!r4c2:r" & LastRow & "c2,0)" & ",match(r2c[0],'" & PSheet.Name & "'!r3c3:r3c" & LastCol & ",0)),"""")"

Excel Formula:
=IFERROR(INDEX(PivotTable!$C$4:$CB$179,MATCH(A3,PivotTable!$B$4:$B$179,0),MATCH(B$2,PivotTable!$C$3:$CB$3,0)),"")

match(rc[-1] is giving me MATCH(A3

My problem is the A3 highlighted in the match... it's giving the correct cell reference; however, I need it to be $A3 so that it remains in column A... When I add R0c[-1], I end up either getting nothing...or a @ symbol in my formula which is canceled by the iferror statement with nothing.

I've scoured these message boards, and apparently, this hasn't come up for anyone else...

Any help would be greatly appreciated!!!
Heather
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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