Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"