Shifting current formula reference in cell one column to the left

Dosnox

Board Regular
Joined
Apr 2, 2012
Messages
52
Hi All,

I've created some complicated macros that automate a lot of tedious work based on some spreadsheet. Now I'm on stuck on something I believe is quite simple?

I have tried to google this and work on it myself but couldn't come up with a solution.

Basically I need to create a macro that will shift the current cell formula one column to the left based on the formula in the cell

As simple example:

The current formula in a cell is ='Sheet1'!C2
The macro then changes this to ='Sheet1'!B2

If the current formula in a cell is ='Sheet1'!G2
The macro then changes this to ='Sheet1'!F2

Due to the nature of the spreadsheets I'm working with this needs to be a formula and not a value.

Thanks for your help in advance!
Shan
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
What would happen to any formula that refers to something in column A of Sheet1?

What is the name of the sheet these formula are on?
 
Upvote 0

Forum statistics

Threads
1,215,639
Messages
6,125,971
Members
449,276
Latest member
surendra75

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