Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default How can I do an Absolute Cell Reference but non Absolute Cell Pais

I have a spreadsheet that is a weekly P&L that combines at the very end. So
it has 52 columns on it that are labled week ending **/**/****. I can export
the data from my accounting program into a spreadsheet but it is not in the
same format as the worksheet we currently keep the weekly tracker in. The
accounting program exports weekly to the same file name it never changes. I
wrote a macro in cell AD to pull the info from the named worksheet and all
the way down the column. Totals out and looks just like the printed P&L.
Problem is Next week is Column AE.. I run the macro and it just inserts over
AD. I need it to be an absolute cell reference for the exported worksheet
from the accounting program but an active cell paiste to whatever column I
put the cursor in before running macro.

I wanted to invert the worksheet so that I could just do current week in
Column 1 and when the macro runs insert column to move everything over.
Problem is the bosses have used this same worksheet forever and like the
current format.

Any help???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How can I do an Absolute Cell Reference but non Absolute Cell Pais

ActiveCell.Column

will give you the column number of the cell that is currently the
activecell.

Not sure how you are referencing, but instead of hardcoding column AD in
your reference, use a method that can utilize information from the
activeCell

for example, instead of Range(AD5)
use cells(5,ActiveCell.column)

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I have a spreadsheet that is a weekly P&L that combines at the very end.

So
it has 52 columns on it that are labled week ending **/**/****. I can

export
the data from my accounting program into a spreadsheet but it is not in

the
same format as the worksheet we currently keep the weekly tracker in. The
accounting program exports weekly to the same file name it never changes.

I
wrote a macro in cell AD to pull the info from the named worksheet and all
the way down the column. Totals out and looks just like the printed P&L.
Problem is Next week is Column AE.. I run the macro and it just inserts

over
AD. I need it to be an absolute cell reference for the exported worksheet
from the accounting program but an active cell paiste to whatever column I
put the cursor in before running macro.

I wanted to invert the worksheet so that I could just do current week in
Column 1 and when the macro runs insert column to move everything over.
Problem is the bosses have used this same worksheet forever and like the
current format.

Any help???



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Absolute cell reference will not remain absolute. Mike K Excel Worksheet Functions 1 October 8th 08 07:12 PM
Making cell reference absolute makes cell format text Excel Worksheet Functions 2 September 22nd 06 04:47 PM
Absolute Cell Reference Joshua K Briley Excel Discussion (Misc queries) 5 December 27th 05 06:32 PM
How can I do an Absolute Cell Reference but non Absolute Cell Pais John Excel Programming 0 July 22nd 05 06:23 PM
Activating a cell without an absolute reference d.i.barr Excel Programming 1 October 20th 04 07:18 PM


All times are GMT +1. The time now is 06:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"