View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Filter Data based on cell value

VLOOKUP will return #N/A if the value being sought (E9) is not in the
first column of the search range (column I).

"Fill right" is a shortcut for copying a formula to multiple cells. Here
are a few ways to do it:

- Click the cell with the formula (I7), then click the fill handle
(small square in the lower right corner of the cell), hold the left
mouse button down as you drag to select cells to the right. This works
for "fill down" as well.

- Click the cell with the formula (I7), then drag to select cells to the
right. Press Ctrl+R.

- Click the cell with the formula (I7), then drag to select cells to the
right. Navigate the menu to Edit | Fill | Right.

You can also copy cell I7, then paste in J7, K7, etc.

Hope this helps!


Bob1866 wrote:
Hi many thanks for your reply, I have entered the formula suggested into I7
which provided cell E9 shows 1234567891 then cell I7 also shows 1234567891,
however, If I put a different number in cell E9 i get an error in cell I7 of
#N/A. I am also not quite sure how to do the "fill right" to copy the rest of
the data in the row.

Many Thanks


"smartin" wrote:

Bob1866 wrote:
Hi, I need to run a macro to filter the data from a query based on the value
of a cell. It is hard to explain so I have put a print screen picture at:

Http://www.nws-web.co.uk

If anyone has any ideas how I can make this work it would be great, I can't
copy the data manually as the worksheet will never actually be open it will
just run calculations in the background.

Many Thanks

Windows XP Professional
Office 2003

Maybe this. In cell I7, fill right:

=VLOOKUP($E$9,$I$11:$M$9999,1+COLUMN()-COLUMN($I:$I),FALSE)