+ Reply to Thread
Results 1 to 15 of 15

Replace for indirect function in formula when table is deleted

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Replace for indirect function in formula when table is deleted

    Hi Guys,

    i am using formula like here:
    =INDEX(INDIRECT("RepositoriesCopy[Credentials]");MATCH("Topo";INDIRECT("RepositoriesCopy[Topos]");0)
    the issue what i have is that indirect has to be applied. Why? Because source table is always created from scratch - removed and recreated.

    It is any way to replace indirect like this?

    Best,
    Jacek

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Replace for indirect function in formula when table is deleted

    Yes you can use table reference in indirect.

    What is your issue now?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    Hi,

    thank you.

    My issue is that table will be removed and created one again and this is why i ahve to use indirect which is volatile and i am afraid that this can cause issues in the future like calculating workbook all the time,

    Best,
    Jacek

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Replace for indirect function in formula when table is deleted

    Quote Originally Posted by jaryszek View Post
    this can cause issues in the future like calculating workbook all the time
    It's true, In your case indirect is the only inbuilt option which is readily available for you with volatility as side effect.

    Otherwise you need to create your own UDF using VBA.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    Thank you,

    ah it is a pity i have to add this for ideas to microsoft to get rif of indirect function somehow

    Best,
    Jacek

  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 2406
    Posts
    44,662

    Re: Replace for indirect function in formula when table is deleted

    There would be another option if you just used cell ranges instead of a table...
    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

  7. #7
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    It would work assuming specific column is always in the same place in workbook?

    What if i will add new column and my desired one will be moved?

    Best,
    Jacek

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

    Re: Replace for indirect function in formula when table is deleted

    Then you're out of luck if it moves!!

  9. #9
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    thank you Glen

    Best,
    Jacek

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

    Re: Replace for indirect function in formula when table is deleted

    Further to this...


    Open the file. IM in purple cells working.

    Delete the table.

    Create a new one, beginning in same column (A).

    Name any other column "Target".

    Populate with a few values.

    IM still works.

    Is that not what you had wanted?
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    Thank you Glenn!

    It is very nice approach. It is close!

    the issue still can be that column A can be also moved into for example column C.
    So this should refer to entire column based on column Name: "$1:$1048576"
    and this "$A:$A" should also be dynamic.

    Best,
    Jacek

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

    Re: Replace for indirect function in formula when table is deleted

    OK... try it now (it still assumes that your Table starts in row 1....).
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    wow this is amazing!

    the best discovery for me in 2022 year for Excel. It is changing my approach to building excel models!
    Disadvantage is that formula is not easry to write but is will work like a charm!

    Best,
    Jacek

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

    Re: Replace for indirect function in formula when table is deleted

    LoL. I might believe you if this was 1st January... not 14th April.

    It is a bit cumbersome... but no INDIRECT. It just occurred that I had been a bit stoopid in my last reply on this, yesterday. Of course, you can restrict it a bit to n columns, rather than all of them... but it's so easy to select the entire sheet with a single mouse click....

  15. #15
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,946

    Re: Replace for indirect function in formula when table is deleted

    hehe Glenn

    yes it will be robust.
    I prefer in Excel the simplest solution. Not using very complicated functions. writing lambdas on full screen.

    It is easy and nice.

    Best,
    Jacek

+ 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] Replace INDIRECT with more elegant function
    By froment in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-26-2020, 12:10 AM
  2. Replace indirect formula
    By helpmeplz_ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-10-2018, 06:13 PM
  3. Replace Indirect() in formula
    By CRIMEDOG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2018, 04:52 PM
  4. Replace IF THEN ELSEIF statement with INDIRECT function?
    By xntdriver in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2016, 05:50 PM
  5. Replace deleted formula when cell cleared
    By diberlee in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2014, 11:44 AM
  6. Trying to replace INDIRECT with INDEX or another function
    By deadlyduck in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-05-2009, 12:51 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