We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel Formula help

I am trying to copy a formula from Wk 1 to Wk 2 on an excel workbook it generates the following formula
=('Wk 1'!K53) I have 52 sheets (ie weeks) and it copies Wk1 in all of them! I need a formula that when copied will progress by one each time ie Wk 2 Wk 3 etc so each sheet gets its info from the previous sheet I've tried everything, googled it, ask friends. I'm stuck can anyone help? Thanks.

Comments

  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    The short answer is......you can't (to my knowledge anyway).
    The sheet number is a fixed and can't be changed in the way you want to do it.
    What you can do, is copy the formula anyway and then do a find-and-replace on each sheet to alter it.
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
  • Le_Kirk
    Le_Kirk Posts: 24,881 Forumite
    Part of the Furniture 10,000 Posts Photogenic Name Dropper
    If you are experienced, even a little bit, in visual basic, you could write a short routine to do it for you. Something like: -
    Dim a
    For a = 2 to 52 (You don't need to do it on Worksheet 1 as it is already there)
    Cell (K53) Select.Copy
    Worksheet a.Select
    Cell (K53).Select.Paste
    Next a

    That's not perfect but it should be a start (if I have interpreted what you want correctly) but to be honest, unless you are doing this multiple times, it will be quicker to do as post #2 suggested.
  • BrianJohns
    BrianJohns Posts: 13 Forumite
    Seventh Anniversary 10 Posts Combo Breaker
    I've tried the find and replace you suggested but it doesn't find formulas unless I'm doing it wrong
  • andybirch
    andybirch Posts: 82 Forumite
    Part of the Furniture 10 Posts Combo Breaker
    There is a option to include formulas or just contents when you find and replace. I thought it always looked at formulas first by default though as I often change formulas by find & replace.
  • BrianJohns
    BrianJohns Posts: 13 Forumite
    Seventh Anniversary 10 Posts Combo Breaker
    Got "Find and Replace" to work now thanks to all
  • rmg1
    rmg1 Posts: 3,159 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Just realised there is a fairly complicated method using INDIRECT if you wanted to go down that route.
    You would need to store the sheet name (just the numeric part) in a cell and then you could use something like:-
    =indirect("'Wk "&A1&"'!K53)

    The above assumes you have the week number in cell A1. I'm not entirely sure the syntax is correct but it should give you a good start.
    :wall: Flagellation, necrophilia and bestiality - Am I flogging a dead horse? :wall:

    Any posts are my opinion and only that. Please read at your own risk.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 351.8K Banking & Borrowing
  • 253.4K Reduce Debt & Boost Income
  • 454K Spending & Discounts
  • 244.8K Work, Benefits & Business
  • 600.2K Mortgages, Homes & Bills
  • 177.3K Life & Family
  • 258.5K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.