cell function to copy contents of another cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What I want to do: create a cell function that will - if cell = quantity 0
then copy worksheet 1 cells a2 to c2 and paste that information to worksheet
2 cells a2 to c2
 
Functions can only return values, they can't directly affect (i.e.,
paste to) other cells.

So in worksheet 2, cell A2, enter

=IF(x = 0, 'Worksheet 1'!A2, "")

where x is your "cell" reference. Copy that across to worksheet 2, cell
C2.
 
One guess ..

Assume quantity is listed in D2 in Sheet1

In Sheet2,
Put in A2:
=IF(Sheet1!$D2="","",IF(Sheet1!$D2=0,Sheet1!A2,""))
Copy A2 to C2
 
Thanks, that answer set me on the right path. I just had to create an IF
formula in each cell on sheet 2 that returned the content of the cell on
sheet 1.
 
Thanks. I couldn't see the tree for the forest, your formula worked, all I
had to do was add in the worksheet name as well the cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top