Heloo
I need a VBA code that check column F and if it will not find USD or EUR or CAD on this column clean the row also data on column F .i need clean not delete.
thank you
Heloo
I need a VBA code that check column F and if it will not find USD or EUR or CAD on this column clean the row also data on column F .i need clean not delete.
thank you
roughly:
For each Cel in Range("F1:F" & LastRow)
If not (Cel ="USd" OR Cel = EUr" or Cel = "Cad") Then
Cel.EntireRow.ClearContents.
Dear smaT
I used the below code but does not work
Sub wewe() For Each Cel In Range("F1:F" & LastRow) If Not (Cel = "USD" Or Cel = "EUR" Or Cel = "TL") Then Cel.EntireRow.ClearContents End If Next End Sub
I used this code and it is work
Sub deleterows() Dim intcount As Integer Dim introw As Integer intcount = ActiveSheet.UsedRange.Rows.Count For introw = intcount To 1 Step -1 If Not Range("D" & introw) = "USD" Or Range("D" & introw) = "EUR" Or Range("D" & introw) = "CAD" Then Range("D" & introw).EntireRow.ClearContents End If Next End Sub
Excellent work.
I expect the student to do their homework and find all the errrors I leeve in.
Please take the time to read the Forum FAQ
Never mind -- had it backwards
Last edited by Paul_Hossler; 09-02-2014 at 07:21 PM.
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3