ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   VB Scripting/Macro - Filling/Editing Worksheet References (https://www.excelbanter.com/new-users-excel/4663-vbulletin-scripting-macro-filling-editing-worksheet-references.html)

Meghan

VB Scripting/Macro - Filling/Editing Worksheet References
 
Question:

What VB code will allow me to rewrite just the worksheet reference in a
function/cell reference. For example it says

=January!$AH40

and I would like a macro that would change it to

=February!$AH40

Any suggestions would be greatly appreciated!!! :)

Background:

I have 12 cells in a row that each refer to the same cell location on twelve
different worksheets within the same workbook.

The fill function does not "fill" the worksheet reference. It is too time
consuming to manually input or edit 2016 cells.





Frank Kabel

Hi
you may have a look at the INDIRECT function for this

--
Regards
Frank Kabel
Frankfurt, Germany
"Meghan" schrieb im Newsbeitrag
...
Question:

What VB code will allow me to rewrite just the worksheet reference in a
function/cell reference. For example it says

=January!$AH40

and I would like a macro that would change it to

=February!$AH40

Any suggestions would be greatly appreciated!!! :)

Background:

I have 12 cells in a row that each refer to the same cell location on
twelve
different worksheets within the same workbook.

The fill function does not "fill" the worksheet reference. It is too time
consuming to manually input or edit 2016 cells.







Peo Sjoblom

This will change the sheet name when copied down

=INDIRECT("'"&INDEX({"January";"February";"March"; "April";"May";"June";"July";"August";"September";" October";"November";"December"},ROW(1:1))&"'!AH40" )

assuming the 12 sheets are named after the months


Regards,

Peo Sjoblom

"Meghan" wrote:

Question:

What VB code will allow me to rewrite just the worksheet reference in a
function/cell reference. For example it says

=January!$AH40

and I would like a macro that would change it to

=February!$AH40

Any suggestions would be greatly appreciated!!! :)

Background:

I have 12 cells in a row that each refer to the same cell location on twelve
different worksheets within the same workbook.

The fill function does not "fill" the worksheet reference. It is too time
consuming to manually input or edit 2016 cells.






All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com