Need help with If Function between sheets

pearl11

New Member
Joined
Dec 16, 2010
Messages
30
I am trying to simplify having to input fixed information.

I have information on two excel sheets/tabs

One sheet is where i want to input data

the other sheet is where i want it to grab the info.

So if I put in 3 in A1, it will look on the second sheet and grab a number from B3 and place this number in A2 (on the first sheet).

If I put in 2 in A1, it will look on the second sheet and grab a number from B2 and place this number in A2 (on the first sheet).

I was able to figure out how to it for one number, but if you ask other numbers it doesn't work.

=IF(A1=3,Sheet2!B3)

so that formula works for the number 3. what if I put in the number 2 or 9 or 211?

Any suggestions?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Welcome to the boards!

Do you have any more conditions? Do you want it so if you put in 4, it will return Sheet2!B4, if you put in 5 it will return Sheet2!B5, etc?
 
Upvote 0
Welcome to MrExcel board...

try this
Code:
=IF(A1=3,Sheet2!B3,IF(A1=2,Sheet2!B2,IF(A1=9,Sheet2!B9)))
 
Upvote 0
You could try:

=INDIRECT("Sheet2!B" & A1)
 
Upvote 0
that works great, thanks

is there a limit on how long the formula can go, like if I am if AI=1000 etc
this would be a large formula
 
Upvote 0
that suggestion works for lots of entries, thanks

yet when i label the columns with titles, this throws off the count

how do i get around this?
 
Upvote 0
What do you mean? Columns are A, B, C, D, etc... What does your Sheet2 look like? What is your overall goal with this formula?
 
Upvote 0
the way the formula is written, it is drawing information from sheet 2 starting from B1 while I want it to start at B3. currently when it draws info from sheet 2 cell B1, on sheet one I am seeing the title.
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,150
Members
448,552
Latest member
WORKINGWITHNOLEADER

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top