+ Reply to Thread
Results 1 to 17 of 17

Error in formula - "Formula typed contains error"

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Error in formula - "Formula typed contains error"

    Hi, short version is, this doesn't work:

    =HYPERLINK(OFFSET("#'Appendices II'!B" & MATCH(3,'Appendices II'!B:B,0),1,1,3,3),"bla bla bla")

    Why not?

    Details:

    I use excel 2010 starter.

    I'm linking to images/text boxes on an 'Appendices' sheet. I use hyperlink() and match() together. The following works well:

    =HYPERLINK("#'Appendices II'!B" & MATCH(3,'Appendices II'!B:B,0),"bla bla bla")

    I can also successfully combine hyperlink(offset()) but not all three; hyperlink(offset(match))). The reason i need offset is that sometimes the link takes me to say item 3, but item 3 is at the bottom of the screen showing only the top row of the image/text box. In other words item 2 will be slap bang in middle of screen grabbing the users attention. I want to select the range of cells relevant to the item to ensure the user is directed to the correct information. I need match because i use auto sort/filter and the standard hyperlink goes to a cell reference (i.e. A7) not the actual item (Item 4) which is moving around when sorted/filtered.

    Any help on this would be great.

    Thanks,

    Matthew

    edit: by doesn't work i mean excel gives message; "The formula you typed contains an error".
    Last edited by mstevenson; 11-27-2012 at 07:13 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    try just putting the column you want to link too say c and adjust the match by the number of rows you want
    =HYPERLINK("#'Appendices II'!C" & MATCH(3,'Appendices II'!B:B,0)+3,"bla bla bla")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Error in formula - "Formula typed contains error"

    Something like

    =HYPERLINK(INDEX('Appendices II'!C:C,MATCH(3,'Appendices II'!B:B,0)+1),"bla bla bla")

    Should work

    The first argument of OFFSET must be a valid range, "#'Appendices II'!B" & MATCH( returns a text string so would need to be qualified as a range using INDIRECT.

  4. #4
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Error in formula - "Formula typed contains error"

    Hi Matthew!
    Welcome to the forum!

    I'm not sure why you have used # in your formula, or what its supposed to do.

    I believe the following formula is what you are looking for:

    =HYPERLINK(OFFSET(INDIRECT("Appendices II'!B" & MATCH(3,'Appendices II'!B:B,0)),1,1,3,3),"bla bla bla")

    If this isn't what you need, upload a sample sheet, so we have something to work on!

    Don't forget to click on the little star to the left of this post if you feel I helped
    Taming the Excel dragon... www.TheExcelphile.com

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    @ jason not in hyperlink jason,besides you need # in there to show this is within the same workbook and
    INDEX('Appendices II'!C:C,MATCH(3,'Appendices II'!B:B,0)+1) would just return the cell contents of cell in c:c
    Last edited by martindwilson; 11-27-2012 at 08:12 AM.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    @TheExcelphile # is shows its in the same workbook no need for offset at all did you not see my post?
    you do not need indirect in hyperlink it works quite well just concatenated
    =HYPERLINK("#'Appendices II'!" & "Z3","bla bla bla")
    will quite happily jump to Z3 of 'Appendices II'!
    Last edited by martindwilson; 11-27-2012 at 08:11 AM.

  7. #7
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    Hi all, thanks for the suggestions. I can't get any to work correctly, and all but Jason.b75 display #ref in cell. Jason.b75's suggestion links to a single offset cell from the first but doesn't select the whole range from one cell to another. If I link to the top row of image, there is a change bottom of image will be off screen and previous image front and center. Likewise, if I select bottom row of image, there's a change top of image will be off screen and next image front and center. This all depends on whether previously selected cell on that sheet was above or below hyperlink reference. This is the reason I want to select a range of cells to ensure whole image being linked to appears in center of screen.

    I may have been misleading with my example, as I really want to be hyper-linking to referenced cell (match(3,'Appendices II'!B:B,0)), but also selecting 10 or 15 cells below. So that part would be more like OFFSET(*the cell*,0,0,15,0) I think.

    I will prepare and upload a sample sheet now, as suggested by The Excelphile.

    Thanks,

    Matthew

  8. #8
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    Please find sample sheet attached. Refer to Sheet: 'WP7 V2' and 'Appendices II'. By the way I am an app tester, but we don't have a bug tracking system installed yet, so I've used excel for my bug reports.

    Many thanks for time and help,

    Matthew

    edit: you will see by following hyperlink from description column of bug no.3 (sheet: WP7 V2), that it appears to be linking to Item 2. Though the correct cell IS selected, it is at bottom of screen, so Item 3 is actually off screen.
    Attached Files Attached Files
    Last edited by mstevenson; 11-27-2012 at 09:17 AM.

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    as i said just increase the result of the match
    =HYPERLINK("#'Appendices II'!B" & MATCH(1,'Appendices II'!B:B,0)+15,"Each time I open the app (debug) app on device, I receive DEBUG: ERROR (see sheet: Appendices II, Item 1).This occurs after splash screen while updates are loading.")

  10. #10
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    Thanks martindwilson for the suggestion. The +15 works great for offsetting to a lower cell, but I would sill have an issue as only one cell is being selected (not the whole range from B45 to B69). This means if linking to item 3 or lower, and then later linking to item 2, the offset cell (B69) will appear at top of screen, and the top of the image and text box for item 2 are cut off (or off screen).

    It's a great tip though that I wasn't aware of so will probably use in another situation

    Matthew

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    however as you swithch back and forth between sheets it will jump to those cells but it depends if the the cell is visible or not from your last visit
    to properly jump you may need some code

  12. #12
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Error in formula - "Formula typed contains error"

    Quote Originally Posted by martindwilson View Post
    to properly jump you may need some code
    I don't think 2010 starter allows for the use of code.

    This is a little better than my earlier failed attempt.

    =HYPERLINK("#'Appendices II'!B"&MATCH(1,'Appendices II'!B:B,0)&":B"&MATCH(1,'Appendices II'!B:B,0)+34,"bla bla bla")

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    now that is much better

  14. #14
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    I guess the solution would need to be either:

    1. Select a range from cell? to cell?+15
    or 2. Select cell? and somehow make that the top row visible on screen.

    If code is required I can work on a different machine with full (non-starter) version of excel. Full version is on work laptop but I usually work on home desktop which only has starter. Of course if required I'll use the laptop.

    I think for now even linking to a single cell in the middle of the image would be OK as a compromised solution, but would be great to find that perfect solution.

    Regarding adding code to excel, I have used VB in the past but never with excel, and would be completely lost with setting this up. If very complicated that route would unfortunately have to go on the back burner for now, as I couldn't justify spending too long trying to fix this half issue. Maybe in my spare time I'll get a chance to look into excel coding.

    Jason.b75. - I just tested your formula and works nicely just can't figure out why it's always selecting to cell?:B34 instead of cell?:cell?+34.

    Also I'm wondering now if selecting a range will actually solve this problem, as hyperlink may not necessarily try to fit entire selection on screen (may just select first cell from range and then allow the rest to go off screen).

    I wonder if it's possible to hyperlink to the actual image or text box.

    Thanks again for your time and help,

    Matthew

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Error in formula - "Formula typed contains error"

    another way is to select the range behind the image/textbox and name it say mypic1
    then you can
    =HYPERLINK("#mypic1","Each time I open the app (debug) app on device, I receive DEBUG: ERROR (see sheet: Appendices II, Item 1).This occurs after splash screen while updates are loading.")
    but put a load of blank rows between each so the others dont impinge on the screen
    Attached Files Attached Files
    Last edited by martindwilson; 11-27-2012 at 10:55 AM.

  16. #16
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    martindwilson, I really like this solution:

    =HYPERLINK("#mypic1","Each time I open the app (debug) app on device, I receive DEBUG: ERROR (see sheet: Appendices II, Item 1).This occurs after splash screen while updates are loading.")

    This also seems to be adaptable i.e. if I edit an appendices item and need to insert rows, the named range updates correctly

    Seems, the simple solutions are always best! I overlooked this because I initially wanted to select the entire row (up to column N) when linking back to bug on WP7 V2 sheet using a named range. This did not work correctly while using filters/sorting, but as I do not filter/sort Appendices II it's great for these links.

    Thanks so much :D

    Also jason.b75 - just as a point of interest, I now realize your formula does not select cell?:B34, it selects cell?:B(x+34) where x is the value inside cell? (i.e. 1,2,3 etc...).

    You are all clever people! Thanks again,

    Matthew

  17. #17
    Registered User
    Join Date
    11-27-2012
    Location
    South Brent, England
    MS-Off Ver
    Excel 2010 starter
    Posts
    7

    Re: Error in formula - "Formula typed contains error"

    Thanks. Great idea to space them out

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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