View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Art Art is offline
external usenet poster
 
Posts: 587
Default copy a list and skipping blanks

Thanks, It works great but I need to have also the amount included to the
items, for e.g. "2 shirts" "5 pants". The formula you wrote just came out the
items that have amount but not the amount included.

"Teethless mama" wrote:

=IF(ISERR(SMALL(IF($B$1:$B$30,ROW(INDIRECT("1:"&R OWS($B$1:$B$3)))),ROWS($1:1))),"",INDEX($A$1:$A$3, SMALL(IF($B$1:$B$30,ROW(INDIRECT("1:"&ROWS($B$1:$ B$3)))),ROWS($1:1))))

Adjust your range to suit
ctrl+shift+enter (not just enter)


"art" wrote:

Which formula do I use if I want to copy a range of cells but skiping the
blanks. For example, in column A is a list of items, and in column B is a
list of the amounts of that item (Eg. Shirts 2, 0 Pants, 5 Socks). Which
formula should I use in column C to copy column A but only these items that
have amounts in column B? Also I want to have the list without ant blanks
cells?