View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default does any one know to copy cells within an IF statement in Exce

On Mon, 1 Jun 2009 15:53:01 -0700, DonE wrote:

An example would be:

This IF Statement is in Sheet2 at C1

IF(Sheet1!A1=1,Sheet1!B1:B17,IF(Sheet1!A1=2,Sheet 1!C1:C17," "))

What I'm trying to do is based on a variable in Sheet one move a row of data
from sheet1 to sheet2 based on informatin in sheet1. The above example would
move 17 cells to this location on sheet2 from C1 to C17.


Doesn't make sense as written. What ROW are you trying to MOVE?

If you are really trying to COPY a COLUMN (and not really MOVE a ROW), then see
if this works:

Change your formula in Sheet2!C1 to:

=IF(Sheet1!$A$1=1,Sheet1!B1,IF(Sheet1!$A$1=2,Sheet 1!C1,""))

Then fill down to Sheet2!C17


--ron