PDA

View Full Version : How to move from one sheet to otherby condition?



goldesign
02-26-2012, 07:41 AM
I need to move the name and surename from sheet1 to empty column in sheet2 by a condition: personal code.
If code match, first two line (name and surename from sheet1) update empty fields in sheet2 right to the same personal code.Is this possible?

Manually without compare and update functions, look like this :

Range("D9").Select
Sheets("Sheet2").Select
Range("D5").Select
Sheets("Sheet1").Select
Range("B9:C9").Select
Range("C9").Activate
Selection.Copy
Sheets("Sheet2").Select
Range("A5:B5").Select
ActiveSheet.Paste
Sheets("Sheet1").Select


Document attached

mdmackillop
02-26-2012, 12:06 PM
=INDEX(Sheet1!B:B,MATCH($D3,Sheet1!$D:$D,0))

goldesign
02-26-2012, 05:09 PM
=INDEX(Sheet1!B:B,MATCH($D3,Sheet1!$D:$D,0))

i cant figure up, get a error "9" out of range, please attach your example on my test.xlsm file

mdmackillop
02-27-2012, 11:03 AM
See attached

goldesign
02-27-2012, 12:56 PM
See attached
thank you, i see that you want to help me, but im not very god in excel progr. i miss something?

i43.tinypic.com/352rnll.jpg

mdmackillop
02-27-2012, 02:32 PM
I don't see the need for VBA here. Am I missing something?

goldesign
02-27-2012, 03:40 PM
I don't see the need for VBA here. Am I missing something?
look at the picture
i43.tinypic.com/352rnll.jpg
a error occurred waht version of excel do you use?

mdmackillop
02-27-2012, 04:53 PM
What result did you expect to see for those cells? There is no corresponding number.

goldesign
02-28-2012, 04:08 AM
i see now but my original sheets contain more than 3000 name's inserted i have to insert manualy the function on each line or this can be done automaticaly?

mdmackillop
02-28-2012, 07:07 AM
Personally, I would do it manually. It only takes two clicks.

goldesign
02-29-2012, 07:35 AM
two clicks in each row, or select the column?

mdmackillop
02-29-2012, 10:52 AM
Use the Fill Button