Hlookup question

wbaid

New Member
Joined
Aug 19, 2008
Messages
37
Hello,

I am using Hlookup to get the information from one tab to another the formula i am using is
=HLOOKUP(G51,'FY09 Sheet1'!F54:Q175,4)

The problem is when i drag the formula the row index number doesn't change from 4 to 5 instead i have to change in every row the row index number manually, is there anyway we can change it automatically because i don't have manually change it 1000 lines of information I have.

Any help will be appreciated.

Thank you
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
You might also want to put $ signs in your range so it doesn't change

=HLOOKUP(G51,'FY09 Sheet1'!$F$54:$Q$175,ROW())

Cheers
GB
 
Upvote 0
Gettingbetter,

As you told me i did ROW() but it doesn't do any thing do i need to put row numbers? Also i want it to go from 3 and next 4 next 5 etc as i drag it.
 
Upvote 0
Hello,

Row()

Will return the row number you are on,

so if you are on row 5 then row() = 5

Therefore when you drag it down the row number will change. If the numbers you need do not correspond with the row you are on, a simple + or - will sort it eg if row 6 needs to bring back the lookup value 4, then I would use Row()-2

Hope this helps
GB
 
Upvote 0
Possibly better to use INDEX and MATCH, e.g.

=INDEX('FY09 Sheet1'!F57:Q57,MATCH(G51,'FY09 Sheet1'!F$54:Q$54))

Like HLOOKUP with a row index of 4 this will match with row 54 and return a value from row 57....but when you copy down the return range will increment by 1 row at a time.

Allows you to delete rows, for instance, without affecting the result

Note: using HLOOKUP with no 4th argument (or MATCH with no 3rd argument) means that your lookup range must be sorted ascending and you may get a "closest match". If you only want an exact match change to

=INDEX('FY09 Sheet1'!F57:Q57,MATCH(G51,'FY09 Sheet1'!F$54:Q$54,0))
 
Upvote 0
barry houdini,

I think its to advance for me because i don't understand what you are doing, if it possible for you to explain in details? If not thats fine.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

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