+ Reply to Thread
Results 1 to 11 of 11

How to rename in formulas

  1. #1
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    How to rename in formulas

    I wish to rename in formula, for example

    =IF(Jan!$A1="","",(Jan!$A$2))

    I wish to rename Jan to Feb, Mar, Apr...and so on!

    Please help.

    Thank you.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to rename in formulas

    Depends what you mean by 'and so on' and how you are operating with this. At face value a simple Find & Replace will achieve the request as stated.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: How to rename in formulas

    Thanks.
    I got it working....by using

    =IF(ISBLANK(Jan!$C2),"",Jan!C2)

    Is it possible to copy past / rename the formula?
    I would like to replace Jan to Feb / Mar / Apr ...so on.

    Thanks

  4. #4
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: How to rename in formulas

    If I am using a find and replace, it replaces all Jan to Feb. The formulas are for a month example Jan, then
    same for Feb, Mar, Apr...until Dec.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to rename in formulas

    Sorry you've lost me. I don't understand.

    Upload an example workbook that shows examples of all permutations of what you start with and what you want to end up with.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: How to rename in formulas

    do you want to rename of copy to a different cell and pickup the different months
    otherwise
    you could use a reference cell with JAN in say sheet1!A1
    and then use an indirect
    =IF(INDIRECT(Sheet1!A1&"!$A1")="","",(INDIRECT(Sheet1!A1&"!$A2")))

    now change sheet1!a1 to Jan

    see attached

    the indirect function will
    look in sheet1!A1 and see whats in the cell
    and then use that to create the rest of the formula
    INDIRECT(Sheet1!A1&"!$A1")
    if sheet1!A1 has the word
    Sheet2
    in it now
    indirect would be
    INDIRECT(Sheet2&"!$A1")
    and when joined becomes
    Sheet2!$A1
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: How to rename in formulas

    Copy down:

    =IF(INDIRECT(TEXT(ROWS($A$1:A1)&"/2017","MMM")&"!$A1")="","",INDIRECT(TEXT(ROWS($A$1:A1)&"/2017","MMM")&"!$A2"))

    Copy across:

    =IF(INDIRECT(TEXT(COLUMNS($A$1:A1)&"/2017","MMM")&"!$A1")="","",INDIRECT(TEXT(COLUMNS($A$1:A1)&"/2017","MMM")&"!$A2"))

  8. #8
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: How to rename in formulas

    Thank you everyone for your help.
    I am really very sorry, may be I didn't explain my requirement
    clearly, my English is not good.

    I have a total of 13 sheets, renamed to Jan, Feb, Mar...upto Dec,
    Every sheet has dates from 1st till end of the month.

    13th sheet is renamed to Account.

    From all 12 sheets (Jan to Dec)...I use "=A1" etc...to get all the data in account sheet,
    I have been able to do all that I want to. The only tiresome work is to copy formulas on
    the Account sheet. For example in Account sheet I have
    "=IF(ISBLANK(Jan!$C2),"",Jan!C2)" ....this formula is in all days in Jan, Feb, Mar..till Dec.

    In Account sheet - I would like to copy "=IF(ISBLANK(Jan!$C2),"",Jan!C2)" to "=IF(ISBLANK(Feb!$C2),"",Feb!C2)".
    Find and replace is not helpful, I am sure there must be some way to do it.

    Please help.

    Thank you.

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,732

    Re: How to rename in formulas

    you have 12 sheets jan to dec
    on the account sheet - dont you want all the jan-dec infor
    or
    just 1 month that you can choose


    you say
    I would like to copy "=IF(ISBLANK(Jan!$C2),"",Jan!C2)" to "=IF(ISBLANK(Feb!$C2),"",Feb!C2)".
    my formula will do that


    on account sheet in a spare cell , all you need to do is type the month
    jan or jul or dec
    and the formula will goto that sheet and bring back whatever is in a2 on that sheet
    if thats all you want

    =IF(INDIRECT(accountsheet!A1&"!$A1")="","",(INDIRECT(accountsheet!A1&"!$A2")))
    now in accountsheet cell a1
    you can put any month
    say mar
    and it will goto mar sheet

    otherwise

    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Last edited by etaf; 09-23-2017 at 05:13 AM.

  10. #10
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to rename in formulas

    Going forward you should seriously consider keeping all your data on a single sheet in a normalised 2 dimensional database range.

    One of your columns in this database would of course be a date column which will allow you to summarise/analyse your data by month (and much else) with a Pivot Table.

    It is rarely a good idea to spread data (like months, departments, staff, products and many other groups of things which may at first thought seem a natural thing to do), across many sheets.

  11. #11
    Forum Contributor mikehk's Avatar
    Join Date
    09-05-2017
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    483

    Re: How to rename in formulas

    You are right. I am seriously thinking of making only 2 sheets (1 for data and another for account).
    I will post with new issues that I may across. Thank you for your advice, highly appreciate.

+ 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. My File Rename Macro Always Doesn't Rename the Last Three files in the list
    By Enright in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2016, 03:46 PM
  2. code to copy and rename 2 Worksheets at same time and maintain formulas
    By CSWinnall in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2016, 09:05 PM
  3. [SOLVED] Copy a sheet, rename it by value in range then export product to new workbook and rename
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2015, 07:24 PM
  4. Rename text in a range of formulas
    By wilsnachjh in forum Excel General
    Replies: 3
    Last Post: 08-12-2014, 07:55 AM
  5. Loop - change value, calculate formulas, copy to new sheet, rename
    By gmn734 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2013, 11:00 AM
  6. Copy and rename worksheets to other workbook but not formulas
    By Oakstream in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2010, 09:27 AM
  7. rename items in formulas
    By rbpd5015 in forum Excel General
    Replies: 10
    Last Post: 04-09-2010, 05:08 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