+ Reply to Thread
Results 1 to 5 of 5

Shorten formula

  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Shorten formula

    I am using the following formula to populate cells from another sheet.
    Please Login or Register  to view this content.
    Is there a way to shorten this formula as A1 will have a number from 1 to 10 and B1 to B10 will have different values or do I have to keep repeating the formula
    Regards Troysie

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Shorten formula

    Hi Troysie,


    You can choose any one as per best fit:-

    =IF(Sheet1!A1=1,Sheet1!B1,IF(Sheet1!A1=2,Sheet1!B2,0))

    =IF(Sheet1!A1=1,Sheet1!B1,Sheet1!B2)

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey
    +91 9810929744
    dilipandey@gmail.com

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Shorten formula

    Try this....
    =INDEX(Sheet1!B1:B10,Sheet1!A1)

    Does that work for you?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    02-09-2010
    Location
    knottingley england
    MS-Off Ver
    Office 365 Excel
    Posts
    53

    Re: Shorten formula

    Thanks to both of you but I think I prefer Rons solution
    regards Troysie

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Shorten formula

    Or at a push ...
    Please Login or Register  to view this content.
    Remember this is volatile, better with Rons' INDEX() solution.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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