+ Reply to Thread
Results 1 to 14 of 14

Multi Sheet Referencing for Formulas

  1. #1
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Multi Sheet Referencing for Formulas

    Hi Everyone

    Okay this might take a bit of explaining but I hope I'll get my message across.

    I've got a Workbook with a number of different sheets, the first of which is the main data input sheet (lets call it Sheet 1 to make it simple).

    In Column/Row AO1 of Sheet 1, I currently have a formula that reads:

    =('Sheet1'!$AN$2-'Sheet1'!$AK$2)/'Sheet1'!$AN$2

    Basically its working out the difference (as a percentage) between 2 figures.

    I'd prefer to send this formula off to Sheet 2, so it can be protected and hidden so that my colleagues who aren't overly Excel-Savvy, don't accidently delete it. Then instead of having the "actual" formula in Sheet 1, I'd just have a fomula such as ='Sheet 2'!G10 which means I could make a quick recovery if an accidental deletion occured.

    The problem I have is, if I drag the formula ='Sheet 2'!G10 from Sheet 1, AO1 to Sheet 1 AO2, it gives me a result of 0.00%.

    Can someone please let me know how I would write the formula in Sheet 2 G10 so when it is referenced in Sheet 1 AO2 by copying down from Sheet 1 AO1, it will deliver a true result instead of a 0.00%.

    Thanks!
    Last edited by Follychops; 05-26-2011 at 03:12 AM. Reason: Moderator Request

  2. #2
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Multi Sheet Referencing for Formulas

    I'm guessing the target reference is changing when you copy the formula, try making the reference absolute -

    ='Sheet 2'!$G$10

  3. #3
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    Hi Dave

    Thanks for the reply, but I already tried this and when I drag AO1 down to AO2, it then returns a value the same as that in A01.



    Any other suggestions?

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Multi Sheet Referencing for Formulas

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  5. #5
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    Here you go!

    Very abridged version - but gets the point across!

    Attached Files Attached Files

  6. #6
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Multi Sheet Referencing for Formulas

    There are no formula in the workbook you posted, can you amend it to demonstrate your actual problem?

  7. #7
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    Sorry about that, it was late on Friday afternoon and my brain had clearly fizzled out!

    Try this one.

    Cheers
    Attached Files Attached Files

  8. #8
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Multi Sheet Referencing for Formulas

    Hi Follychops,

    Your formula seems to be working, or am I missing something?

    Sheet2 column A is calculating percentage from sheet1 columns A and B. Sheet1 column C returns the percent values from sheet 2. I tried copying it down and as I say it seems to work!

    Dave

  9. #9
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    Hi Dave

    Maybe my original explanation of the problem wasn't totally clear.

    The problem I am having is this:

    Sheet 1 holds the data, but the formula to calculate the percentage actually sits in Sheet 2.
    I then have a "formula" back in Sheet 1 that reads of the actual formula in Sheet 2 and returns the result, in you guessed it, Sheet 1.

    The problem I have is the "formula" ie ='Sheet2'!A1 , once pulled down doesnt return a correct value.

    I really just want to have one cell in Sheet 2 that is referenced in Sheet 1.

    So for example:

    If in Sheet 1 I put in: ='Sheet2'!A1 - I want to be able to drag that "formula" down as many cells as I like, and it calculates the correct amount, no matter how many rows down I go.

    I hope that clears things up a bit!

    Cheers

  10. #10
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Multi Sheet Referencing for Formulas

    Follychops,

    The workbook you posted does exactly that already! I can't recreate the problem you describe.

  11. #11
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    I've come up with the following formula as a guess to how to get around this issue, but it isn't working:

    =SUMPRODUCT(--('Current Transactions'!$O$2:OFFSET('Current Transactions'!$O$16,-1,0)="DEPOT"),--(IF('Current Transactions'!$AR2:OFFSET('Current Transactions'!$AR$16,-1,0)="Not Applicable",('Current Transactions'!$AK2:OFFSET('Current Transactions'!$AK16-1,0-'Current Transactions'!$AN2:OFFSET('Current Transactions'!$AN16,-1,0)/ABS('Current Transactions'!$AN2:OFFSET('Current Transactions'!$AN16,-1,0))),('Current Transactions'!$AR2:OFFSET('Current Transactions'!$AR16,-1,0)-'Current Transactions'!$AN2:OFFSET('Current Transactions'!$AN16,-1,0))/ABS('Current Transactions'!$AN2:OFFSET('Current Transactions'!$AN16,-1,0))))))

    In addition to this, I need it to ignore cells in column AK that have no data in them.

    Any ideas?

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Multi Sheet Referencing for Formulas

    @Follychops: barring the last post, which seems to have moved on to a higher level of complexity, I agree with Dave H9 ... the workbook/worksheet/formulae does exactly as you have said you wanted.

    In what way does it not return the correct value? Does it return zeros when there should be a value? Does it repeat a value from an earlier cell?

    Have you got calculation set to Manual or Automatic?

    Why not just unlock the cells where your users need to enter data and then protect the sheet with a password?

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  13. #13
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    Hi there

    I've had another look at this, and the worksheet I have posted, doesn't really capture the actual complexity of the worksheet in reality, so I will work on getting a copy of that up shortly so it might make more sense.

    In the meantime I can answer a couple of your questions.

    1) The Calculation is set to Automatic

    2) I can't lock the cells/columns as this is a moving spreadsheet that will expand and shrink with time, so if cells are protected, this causes problems.in adding/deleting rows.

    Once you see the full spreadsheet, which I hope to get up shortly, this will probably make a lot more sense.

    Cheers for your replies in the interm though!

  14. #14
    Registered User
    Join Date
    05-18-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: Multi Sheet Referencing for Formulas

    I've revisited this and am going to take a new tack, based on some of your comments, so will call this "solved" and start a new thread so we can look at this from a fresh perspective.

    Cheers for your comments.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1