+ Reply to Thread
Results 1 to 11 of 11

rename items in formulas

  1. #1
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    rename items in formulas

    Guys,

    I have 52 rows with 7 columns in each row that need to renamed by hand and it is a pain in the but.

    Is there a way to do the following

    coloum A of each row is labeled WEEK XX with XX being a number and letter.

    for example
    Week 1a
    Week 1b
    Week 2a
    Week 2b etc etc up to 26a and 26b

    Now because the way my cell formulas were copied they are all mislabeled.So it will take forever by hand to do this. Can I come up with a micro to run and do it easy.

    In Row 10 for example Column A is WEEK 1a

    so in the 7 formulas in that row I need the existing sheet name changed to WEEK 1a.
    for example
    column D has ='Week 6b'!I$11
    that needs to be ='Week 1a'!I$11


    to sum it up simple in ROW 10 every where where WEEK xx is it needs to be = to 10A which is Week 1a.

    Matt
    Attached Files Attached Files
    Last edited by rbpd5015; 04-09-2010 at 08:12 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: rename items in forumlas

    You could change D10, for example, to

    =INDIRECT("'" & A10 & "'!I$11")

    ... then the reference would change automatically whenever yo change col A. The downside is that the formula is volatile, meaning it will recalculate each time anything calculates.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: rename items in forumlas

    How do I use Indirect for these

    =8-('Week 1a'!$C$11)

    =IFERROR('Week 1a'!U$12,"")

    =IFERROR('Week 1a'!X$11/'Week 1a'!U$12,0)

    Thanks,

    Matt

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: rename items in forumlas


    =8 - indirect("'" & a1 & "'$c$11")

    =iferror(indirect("'" & a1 & "'!u$12"), "")

    =iferror(indirect("'" & a1 & "'x$11") / indirect("'" & a1 & "'!u$12"), 0)


    ... changing A1 approriately.

  5. #5
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: rename items in forumlas

    you are saying a1 did you me A10?

    I am getting an invalid cell reference.

    Matt

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: rename items in forumlas

    ... changing A1 appropriately.
    ... meaning change it to the row in which the formula appears. If it appears in row 10, change it to A10.

  7. #7
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: rename items in forumlas

    This doesnt help because A1 does not stay the same.

  8. #8
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: rename items in forumlas

    ok


    =8 - indirect("'" & a1 & "'$c$11")

    this is the formula you gave me no

    A10 is Week 1a
    A11 is Week 1b
    A12 is Week 2a
    A13 is Week 2b
    A14 is Week 3a and so on


    NOW

    I need this formula

    =8-('Week 1a'!$C$11)
    where Week 1a is to be replaced by the value in the current rows A column

    I think I was confusing you before

    that's the same with these 2 also

    =IFERROR('Week 1a'!U$12,"")

    =IFERROR('Week 1a'!X$11/'Week 1a'!U$12,0)


    Matt

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: rename items in forumlas

    Do you mean?

    =8-(INDIRECT("'"&INDEX(A:A,ROW())&"'!$C$11"))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  10. #10
    Forum Contributor
    Join Date
    06-30-2008
    Location
    PSL, FL
    Posts
    271

    Re: rename items in forumlas

    NBVC,

    That works GREAT can you care to share with me how that formula breaks down. I am here to learn just not find answers.

    If I learn how you did it I can do it for


    =IFERROR('Week 1a'!U$12,"")

    =IFERROR('Week 1a'!X$11/'Week 1a'!U$12,0)

    Matt

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: rename items in forumlas

    I just replace your "sheet name" with INDEX(A:A,ROW())

    which indexes column A, and set the row number to the current row...

    so


    =IFERROR(INDIRECT("'"&INDEX(A:A,ROW())&"'!U$12"),"")

    and

    =IFERROR(INDIRECT("'"&INDEX(A:A,ROW())&"'!X$11")/INDIRECT("'"&INDEX(A:A,ROW())&"'!U$12"),0)

+ 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