View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Copying a cell value to another sheet by using If statement

Hi Naga,

Am Tue, 25 Dec 2012 02:15:29 -0800 (PST) schrieb naga rajan:

A1=john or james or raja
B1= salary

If A1="john" then B1 should be copied to B1 of sheet 2
If A1="james" then B1 should be copied to C1 of sheet 2


in B1 of sheet2:
=IF(Sheet1!A1="john",Sheet1!A2,"")
in C1 of sheet2:
=IF(Sheet1!A1="james",Sheet1!A2,"")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2