+ Reply to Thread
Results 1 to 9 of 9

Breaking down a formula

  1. #1
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Breaking down a formula

    In basic terms, what is the formula asking please?

    =INDIRECT("AG"&MID(B7,FIND("$",B7,2),7))
    Last edited by Marvo; 03-25-2024 at 05:31 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Breaking down a formula

    You should be asking this in the thread where you were given the formula.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Breaking down a formula

    FIND("$",B7,2)

    Find "$" in B7 starting at character 2 in the cell (in other words, ignore character 1). This retruns a number (the position of the character in the cell).

    MID(B7,...,7))

    Extract 7 characters from B7 starting at the position returned by the FIND function.

    =INDIRECT("AG"&...)

    Will be equal to cell AG followed by the value generated by the MID function.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Breaking down a formula

    =INDIRECT("AG"&MID(B7,FIND("$",B7,2),7))

    If B7 contains Q$123456
    Red it finds the position of the $ sign that occurs from the second character onwards. It then returns (up to) the next 7 charatcters (blue).

    So it returns $123456. It then goes to cell AG$123456 and returns the value it finds there.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  5. #5
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Breaking down a formula

    Thank you.

    and if "AG" was on another sheet the formula can't work?

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Breaking down a formula

    Not like that.

    You'd need

    =INDIRECT("'Sheet1'!AG"&MID(B7,FIND("$",B7,2),7))

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Breaking down a formula

    No - you would neet to include the sheet name:

    =INDIRECT("Sheet1!AG"&MID(B7,FIND("$",B7,2),7))

  8. #8
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Breaking down a formula

    Thank you both. I'd so nearly got that myself, was going in the right direction. I thought "AG" was the problem, I'd tried =INDIRECT(All!"AG"&MID(B7,FIND("$",B7,2),7)) but hadn't realised I had to move the first ".

    It's all well and good people giving you formulas but if you don't understand how they work then if something goes wrong or gets moved, you can't put it right and have to ask again. I do want to learn.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,981

    Re: Breaking down a formula

    Learning is essential, otherwise you don't move forward. Glad to have helped again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] formula for a sum difference column and ability to add new rows without breaking formula?
    By jitterbug888 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-02-2017, 08:01 AM
  2. Breaking down a VLOOKUP formula
    By alexbean in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-02-2016, 04:44 PM
  3. Help breaking down this formula
    By optimusdantron in forum Excel General
    Replies: 3
    Last Post: 06-02-2015, 09:56 AM
  4. Hi guys, I need help breaking down this formula
    By bigmit37 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-28-2015, 04:06 AM
  5. LOOP formula breaking
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-08-2012, 04:28 PM
  6. Formula's breaking links on their own...
    By JRdeeping in forum Excel General
    Replies: 3
    Last Post: 06-10-2009, 07:26 AM
  7. Breaking down this excel formula
    By jeremyagoodson in forum Excel - New Users/Basics
    Replies: 20
    Last Post: 10-11-2007, 08:40 PM

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