# Shorten formula

1. ## Shorten formula

I am using the following formula to populate cells from another sheet.
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. ## 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>

3. ## Re: Shorten formula

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

Does that work for you?

4. ## Re: Shorten formula

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

5. ## Re: Shorten formula

Or at a push ...
Remember this is volatile, better with Rons' INDEX() solution.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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