INDIRECT - worksheet level

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,141
Office Version
  1. 365
Platform
  1. Windows
I am having problems using match and index with INDIRECT and I cant see why.

Cell G1 is populated in VBA when the new weeks sheet is created.
Code:
    'retain previous worksheet name for Saturday calcs
        Range("G1") = "''" + WS.Name + "'!"

The reason for not using a direct link to the cells on the previous week is on any week rows are allowed to be inserted. - I started on this foot.

Below shows H8 which does not work and cells G8 & I8 which do but point to the wrong worksheet when the sheet is copied week by week...

Excel Workbook
GHI
1JS PREP WK (44)'!
2
3
4SATURDAY
5Pack PlanArrivalsSG1
617-Oct
7
81#REF!3
9
10
11
12
13
JS PREP WK (45)


Martin
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Your INDIRECT formula looks wrong to me:
INDIRECT($G$1&$AV$1:AV166)
is trying to use the contents of AV1:Av166 as part of the address string. It would need to be:
INDIRECT($G$1&$"AV$1:AV166")
to use that actual range reference.
 
Upvote 0
Duh! smacked in the face by the dreaded quotes.
- what a plonker

cheers Rory
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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