PDA

View Full Version : Copy or link data between sheets



tresa123
06-24-2008, 10:46 AM
hi

I am a newbie in Excel macros and I need to write a macros with the following conditions

The macros should copy the contents of one column from one worksheet to another column in another worksheet and the column titles(names) are different in the worksheets.The conditions like "passed" "failed" are filled in the first column (from worksheet1 )according to the values in the another column from (worksheet 2)

Any help is appreciated

tresa

Ago
06-24-2008, 10:53 AM
Huh??

as far as i understand its not very hard to write that macro.
but i have big problems understanding what to do.

what are the sheetnames?
what columns are we talking about (A, B, C....) ?
is it the columns that is diffrent on either worksheet or is it the headertext?
passed and failed are suppoesed to go where? and according to what value?

i think the easiest is if you would upload a sample with dummytext so we can see what should be done.

welcome to the forum tresa!

grichey
06-24-2008, 11:02 AM
The easiest is to just link them. If you do need a maco, ago is right, that's a very straight forward macro if you know sheet names etc.

tresa123
06-24-2008, 11:24 AM
sample example

write macros for writing the results from the "Final result" tab to the Sheet1 or the Sheet 2 according to the follwoing conditions

Sheet 1- Class1

Sheet 2- Class 2


On class 1 or class 2 write

X-"Passed" column if student passed according to the final result tab
X-"failed" column if student failed according to the final result tab
N/A in the "Passed" column if student didnt give the test according to the final result tab


tresa

grichey
06-24-2008, 11:38 AM
you need to just put a formula in your Sheet1 and Sheet2 referencing your Final Result sheet.

For example assuming you have the same list of students on all 3 sheets in column A with test scores in B on sheets 1 and 2 and test scores in B and C for the corresponding sheet1 sheet2 classes:

Sheet1 B1: =if((Final Result!B1="Passed",Final Result!B1="Failed"),Final Result!B1,"NA")
Sheet 2 B1: =if((Final Result!C1="Passed",Final Result!C1="Failed"),Final Result!C1,"NA")

fill down

MCSimmons
06-24-2008, 01:02 PM
Thanks! Worked for me as well.

lucas
06-24-2008, 01:10 PM
Hi tresa, I have changed the name of your thread. Try to give your thread titles meaninful names so that when folks are searching the forum with a problem similar to yours they will be able to find it.

Additionally I would give you a clue to the forum: Lots of people ignore threads titles urgent or help, especially if you use exclaimation marks. Your problem is no more urgent than anyone elses. Welcome to the forum.

tresa123
06-24-2008, 01:22 PM
Thanks that was easy:)

grichey
06-24-2008, 01:48 PM
Is MC SIMMONS and tresa123 the same people? Both are thanking and have same post count and joining date.