Picky/Choosy

  • Thread starter Thread starter Lexette_jan
  • Start date Start date
L

Lexette_jan

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
 
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
 
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
 
I think this code should do this as cell is value in column A macro will select each cell in column A if matches criteria it enters criterial in column D then replaces criteria with -1 etc in column A then moves to next cell and repeats
if this does not work i'm sorry i'm new to trying to hel

----- (e-mail address removed) wrote: ----

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
 
Back
Top