Lookup Function not doing what I want

nova110488

New Member
Joined
Aug 30, 2011
Messages
4
I am trying to enter this formula across 5000 cells, the problem I get when trying to drag the formula down is not only the RED is changing, the lookup vector and result vector are also increasing (BLUE). Is there any way I can create a macro to enter this for me, or adjust the way excel modifies the formula?

What is happening:
Code:
=LOOKUP('Full Report'![B][COLOR=red]D2[/COLOR][/B],'Data Legend'![COLOR=blue][B]A2:A16[/B][/COLOR],'Data Legend'![COLOR=blue][B]B2:B16[/B][/COLOR])
=LOOKUP('Full Report'![COLOR=red][B]D3[/B][/COLOR],'Data Legend'![COLOR=blue][B]A3:A17[/B][/COLOR],'Data Legend'![COLOR=blue][B]B3:B17[/B][/COLOR])
=LOOKUP('Full Report'![COLOR=red][B]D4[/B][/COLOR],'Data Legend'![COLOR=blue][B]A4:A18[/B][/COLOR],'Data Legend'![COLOR=blue][B]B4:B18[/B][/COLOR])

What I want:
Code:
=LOOKUP('Full Report'![B][COLOR=red]D2[/COLOR][/B],'Data Legend'![COLOR=blue][B]A2:A16[/B][/COLOR],'Data Legend'![COLOR=blue][B]B2:B16[/B][/COLOR])
=LOOKUP('Full Report'![COLOR=red][B]D3[/B][/COLOR],'Data Legend'![COLOR=blue][B]A2:A16[/B][/COLOR],'Data Legend'![COLOR=blue][B]B2:B16[/B][/COLOR])
=LOOKUP('Full Report'![COLOR=red][B]D4[/B][/COLOR],'Data Legend'![COLOR=blue][B]A2:A16[/B][/COLOR],'Data Legend'![COLOR=blue][B]B2:B16[/B][/COLOR])

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try

=LOOKUP('Full Report'!D2,'Data Legend'!A$2:A$16,'Data Legend'!B$2:B$16)
 
Upvote 0
Hi and welcome to the board.
I'm not completely sure I understand what you're asking, but I think you're wanting to copy the formulas and not have them adjust their cell references relative to where you're pasting them. (yes?)

If you have the following formula:
Code:
=LOOKUP('Full Report'!D2,'Data Legend'!A2:A16,'Data Legend'!B2:B16)
and wanted to paste it somewhere, having the cell references not update to the new location you would put a dollar sign ($) in front of the row & column references. (This makes them absolute references instead of the relative references being used now.)

EDIT:
I see Vog got here while I was interrupted posting my response.
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

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