Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Picky/Choosy
Can someone assist me, please?
I am looking for a macro that searches down column A for one of the following criteria cuts and copies the criteria to column D and puts -1 to -5 in its place. CRITERIA REPLACED WITH AQC STANDARD -1 AQC DUPLICATE -2 AQC SPIKE -3 AQC DIFFERENCE -4 LOG DIFFERENCE -5 None of the other information in column A must be copied to column D only rows that fit the criteria. Thank you Jan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Picky/Choosy
Jan
Try For Each cell In Range("a:a") If cell = "aqc standard" Then cell.Offset(0, 3) = cell.value cell.value = -1 Elseif cell = "aqc duplicate" then cell.Offset(0, 3) = cell.value cell.value = -2 End If Next cell repeat elseif for other criteria before end if ----- Lexette_jan wrote: ----- Can someone assist me, please? I am looking for a macro that searches down column A for one of the following criteria cuts and copies the criteria to column D and puts -1 to -5 in its place. CRITERIA REPLACED WITH AQC STANDARD -1 AQC DUPLICATE -2 AQC SPIKE -3 AQC DIFFERENCE -4 LOG DIFFERENCE -5 None of the other information in column A must be copied to column D only rows that fit the criteria. Thank you Jan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Picky/Choosy
Sorry my mistake I did not explain it well. The -1 to -5
is to show in column A in place of criteria. The criteria (AQC STANDARD ect) has to show in column D. Thanks Jan -----Original Message----- Jan Try For Each cell In Range("a:a") If cell = "aqc standard" Then cell.Offset(0, 3) = cell.value cell.value = -1 Elseif cell = "aqc duplicate" then cell.Offset(0, 3) = cell.value cell.value = -2 End If Next cell repeat elseif for other criteria before end if ----- Lexette_jan wrote: ----- Can someone assist me, please? I am looking for a macro that searches down column A for one of the following criteria cuts and copies the criteria to column D and puts -1 to -5 in its place. CRITERIA REPLACED WITH AQC STANDARD -1 AQC DUPLICATE -2 AQC SPIKE -3 AQC DIFFERENCE -4 LOG DIFFERENCE -5 None of the other information in column A must be copied to column D only rows that fit the criteria. Thank you Jan . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|