+ Reply to Thread
Results 1 to 6 of 6

Nested if with increment value

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Nested if with increment value

    Hello,

    I'm trying to re-write the following formula without extending it too long each time the year increases. What would be the way of doing it without having to create too many nested if?

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thank you.

  2. #2
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Nested if with increment value

    I found this one, which actually works but I'm sure there is another way if M2 had no "fyXX" in it.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  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,820

    Re: Nested if with increment value

    Having to make a wild guess here based on what you've told us:

    =IF($M2="", "","FY"&LEFT($M2,2))
    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.

  4. #4
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Nested if with increment value

    Thanks AliGW. Indeed, it is another way for writing it. I'm wondering if there is a way to increment without a very long nested if though - say, if M2 = 1 and increments so the corresponding value would be FY18 (for M2 = 1), FY19 (for M2 = 2), etc.

    Thank you

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Nested if with increment value

    Try:

    =IF($M2="", "","FY"&(17+$M2)
    Quang PT

  6. #6
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Nested if with increment value

    Thank you all very much.

+ 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. Increment by 1 if email is send else no increment.
    By A9kurs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2021, 01:25 PM
  2. [SOLVED] Compiling and accessing nested collection within a nested dictionary
    By jrevball in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2020, 10:20 AM
  3. [SOLVED] Nested Sumif's or how to sum data based on nested criteria
    By dlietz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-07-2014, 11:36 AM
  4. How to reduces Nested IF code(144 Nested IF) to achive same functionality
    By jobseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 09:45 AM
  5. [SOLVED] Control Button to increment by 1 and then select next cell in row to increment that cell
    By rammergu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2012, 07:35 PM
  6. nested ifs to increment up.
    By Luminary Xion in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-03-2008, 01:25 PM
  7. Increment/Increment letter in alphabetical order
    By Neil Goldwasser in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2006, 05:10 AM

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