PDA

View Full Version : Solved: Moving data from sheet1 to sheet 2



Tenspeed39355
08-13-2007, 05:33 PM
Hi guys. I would like to move some data from sheet1 to sheet2.
I have tried using vlookup but I must be using the wrong formula.
Here is what I want to do. I have matching symbols in sheet2 in column A
that I have in sheet1 comumn A. What I am trying to do is the following.
If the data in Sheet1 column C is more that the data in Sheet1 column B then I want the data in Sheet1 column D to appear in Sheet2 column C.
If the data in Sheet1 column C is less that the data in Sheet1 column B then I want the data in Sheet1 column E to appear in Sheet2 column E.
I have tried using the IF statement with no luck. Any Help with this?
Thanks
Max

anandbohra
08-13-2007, 11:06 PM
hi Tenspeed39355
type this formula in Sheet2 Cell C
=IF(VLOOKUP(A2,Sheet1!$A:$C,3,0)>VLOOKUP(A2,Sheet1!$A:$C,2,0),VLOOKUP(A2,Sheet1!$A:$D,4,0),"")

& this one in Sheet2 Cell E
=IF(VLOOKUP(A3,Sheet1!$A:$C,3,0)>VLOOKUP(A3,Sheet1!$A:$C,2,0),"",VLOOKUP(Sheet2!A3,Sheet1!$A:$E,5,0))

this will work

if not getting desired result then post your excel file

will mentione formula there itself

Tenspeed39355
08-14-2007, 05:26 AM
Hi Look at your 1st and 2nd formulas. The last part of the formula has the
word Sheet with a space in the word. I changed that to Sheet. I then ran the two formulas. I had to make a change or two so the formulas would
work. Thanks for all your help. I never would have figured that one out.
Good Job
Max

anandbohra
08-14-2007, 05:31 AM
actually space came when i submit reply.
the same earlier also happens with me but no way if you got your solution then its fine.
& dont forget to mark thread as solved which u can locate under thread tools.