I have a 3 sheet workbook. I have data that is entered in the "entry" sheet. In the "report" sheet I need to input a week number. I would then have excel look into the "entry" sheet in a specific row, find the same week number . Then select a range of cells fromthe "entry" sheet and copy/paste the cells frm that range into the "report" sheet in a different row/column. Any help you can provide would be greatly appreciated! Thanks

Hi, Assuming the week numbers are on one row and the relevant data for each week is in the same column, below the relevant week number, then use a series of HLOOKUP() functions.

These can be used to return data from the selected week number column, in the entry sheet.

The HLOOKUP() functions are on the report worksheet, wherever you need data from a specified week.

If cell A1 on the report sheet is used to select the week number, and week numbers are in row 1 on the entry sheet, the cell formula looks like this:

=HLOOKUP($A$1,Entry!$A$1:$BA$21,3,FALSE)

In this case a value is returned from the second row of data below the week numbers. (The week numbers themselves are row 1).

To work, the range of data specified must contain at least as many rows as the offset value - see the help file).Regards

Thank you. I tried the HLookup and am not getting the results. Here is what I did:

=HLOOKUP(B5,'Entry '!C17:BC17,'Entry '!20:20,FALSE)

I tried it with just , 20,FALSE, but that also returned Ref#

I really appreciate your help

Thanks

Hi, 1. I am assuming that the worksheet name 'Entry ' does include a terminal space.

2. You don't use ''Entry '!20:20'

The third argument is a numerical value representing the row offset.

If your week numbers are on row 17, then row 20 is 43. The initial range 'Entry '!C17:BC17 must include the required row of data - in this case row 20

The formula is likely:

=HLOOKUP($B$5,'Entry '!$C$17:$BC$20,4,FALSE)Use $ signs for addresses which will be fixed - cell B5 for example, so that if you copy or drag the formula to another cell, it still refers to B5.

Regards

THANK YOU - That really helped Again sorry for the 2 feeds!!

Hi, Glad to have been able to help.

If you use the formula to copy data from a series of rows, say 20, 21 & 22

and your first formula is on row 9 of the report worksheet, you can use this:

=HLOOKUP($B$5,Entry!$A$17:$BA$23,ROW()-5,FALSE),

then drag the formula down two more rows.The formula will look the same, but the returned values will be from sequential rows.

On row 9 the offset was 9-5 (= 4)

The next row it is 10-5 (=5)

and on row 11 it is 11-5 (=6)The row() function just returns the number of the row that it is on.

Regards

Ask Your Question

Weekly Poll

Do you think Microsoft's new Surface Go will be a hit?

Discuss in The Lounge

Poll History