Formula "breaking" when moving sheets

AndreaG

New Member
Joined
May 14, 2015
Messages
23
I have the following formula in each sheet in a workbook:
=SUMBYCOLOR(A35,INDIRECT("o35:"&$B$6&"35"))
which works great (thanks to the help received on the forum yesterday :) )
The only problem is the project I am doing will involve me moving the sheets around (basically it is live document in the business so I can only amend the worksheets in small batches, and there are alot of changes needed to get them consistent.)

When I move the worksheets I had completed, the above formula returns the error NAME!. I did change the workbook name as I resaved it - would this be what is causing the error? IF so, can I fix/avoid it?

Many thanks again
Andrea
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
try this, the formulas will only work in a Workbook that has been saved.

=SUMBYCOLOR(A35,INDIRECT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)&":"&$B$6&"35"))
 
Upvote 0
Thanks Alan
Apologies for being daft but do I type the file name into "filename"? Currently it is returning a #value error which looks to be a circular reference. Could you let me know what the reference to A1 is? Basically B6 contains a letter corresponding to the column I want to sum to from column O, on each row.
Thank you
Andrrea
 
Upvote 0
all this part is to work out the tab name, A1 can be any reference cell as long as it doesn't has formula in it.
again, you need to save the workbook first for that to work

MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)
 
Upvote 0
Sorry to bother you again
I am still getting a #value error with a circular reference.
Could you confirm the square bracket is correct (I'm just not familiar with it being used independently, but as it obvious I'm no expert!)
Also, how does the formula pick up the start point (ie column O?) I have tried it with "o35:"&$B$6&"35" at the end but get the same error message
 
Upvote 0
that's Ok, if you place this anywhere in the sheet

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

will that give you the tab name?
 
Upvote 0
sorry, i'd missread your problem altogether
 
Last edited:
Upvote 0
your original formula =SUMBYCOLOR(A35,INDIRECT("o35:"&$B$6&"35")) is independent of worksheet, shouldn't be a problem to move it around

have you copy the UDF SUMBYCOLOR to the new workbook?
 
Last edited:
Upvote 0
Just worked it out - the function for Sumbycolor was not in the new worksheet I was saving into. Phew!
Thanks for quick way of returning the tab name - I'll definitely find a use for that!
Cheers
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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