Hi
I have a spreadsheet with 3 worksheets. I am trying to get data over from one sheet to another if it meets a certain criteria (ie a grading of 2 or 3).
How can I get the data over so it appends below the previous one and therefore eliminates blank lines?
The data is as follows:
Grade Comment
2 This is a test
4 Another test
3 Yet another test
The data I want on the other sheet is the Comments. I have done an "if" to select the relevant comments if the grade is 2 or 3 and gone down each row of the spreadsheet. However I get the #Name error on the blank rows where the criteria is not met.
I think this may need a loop statement which says something like "if [sheet1]A! = 2 then A! [comments] then goto next row and repeat etc.
Or it may need an append statement so each true comment places itself on the other worksheet below the previous one.
Trouble is I have no idea how to write the code that will do this!
I would be grateful for your help so I can record the macro to run automatically.
Thanks
Lynne
I have a spreadsheet with 3 worksheets. I am trying to get data over from one sheet to another if it meets a certain criteria (ie a grading of 2 or 3).
How can I get the data over so it appends below the previous one and therefore eliminates blank lines?
The data is as follows:
Grade Comment
2 This is a test
4 Another test
3 Yet another test
The data I want on the other sheet is the Comments. I have done an "if" to select the relevant comments if the grade is 2 or 3 and gone down each row of the spreadsheet. However I get the #Name error on the blank rows where the criteria is not met.
I think this may need a loop statement which says something like "if [sheet1]A! = 2 then A! [comments] then goto next row and repeat etc.
Or it may need an append statement so each true comment places itself on the other worksheet below the previous one.
Trouble is I have no idea how to write the code that will do this!
I would be grateful for your help so I can record the macro to run automatically.
Thanks
Lynne