Would like to copy a cell reference used in another cell's formula. Cell's formula changes...

MistakesWereMade

Board Regular
Joined
May 22, 2019
Messages
103
So... I think I have a difficult question...

I have cells that are sorted via the vba code below...

Code:
Dim i As Integer


Private Sub Worksheet_Calculate()


Application.EnableEvents = False


For i = 1 To 1


    Range("C1:C501").Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlYes
    
Next i


Application.EnableEvents = True


End Sub

Here is a picture for a visual of what I want to do.

PIC.png


The cell contents of the cells in the range "C1:C501" are determined by a formula. Because my code sorts these cells automatically after their input is changed, the cell references used in say, C2, changes often. I would like to take a particular cell reference used in the formula box and store it in another cell range. In other words... If the cell reference for a particular input requires that he formula in C2 uses cell reference E2, I would like to either store the value of E2 in a cell or literally store "E2" in a cell. I feel like this might be achievable with VBA...
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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