Hardcoding doesn't work when row is deleted

nicolehalliday

Board Regular
Joined
May 19, 2010
Messages
56
Hi!

I have 110 columns of data that are 500 rows long. My macro pastes the most recent column of data at the right end of the table, and then deletes the least recent column which is the most left of the table. It is basically rolling over every day to contain only 110 columns.

I am having problems with hardcoding columns. In the separate spreadsheet that I take my most recent column of data for, I have the following cell:

=WORKDAY(highs!$EE$1,1)

The date that returns in this cell determines the data that is copy/pasted into the table. However, after one run of my macro the cell turns into:

=WORKDAY(highs!$ED$1,1)

I thought the $ signs would hard code it so that no matter what, it is referencing the date in EE1. It is not working because I keep deleting column Z in my macro. Is there a way to do this? Thanks!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Ideally, try not deleting columns/rows.
Try copy/pasting new data on top of the old data...

Otherwise, you can Try

=WORKDAY(INDEX(hights!$1:$1,135),1)
 
Upvote 0
Thanks for the replies! I thought I'd avoid posting code if not necessary bc its so long. The INDEX function works like a charm, much appreciated!!!
 
Upvote 0

Forum statistics

Threads
1,224,604
Messages
6,179,857
Members
452,948
Latest member
UsmanAli786

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