if ( multiple criteria) then

christchaaya

Board Regular
Joined
Apr 5, 2013
Messages
86
Hello guys.

Code:
Range("a" & Cells.Rows.Count).End(xlUp).Select
Range(Selection, "a1").Select
For Each cell In Selection
If Not IsEmpty(cell.Value) Then
[COLOR=#FF0000]If cell.Value <> "2012*" Then[/COLOR]
cell.Copy
cell.Offset(0, 5).PasteSpecial
End If
End If
Next cell


I have a to copy from column A some cells ( e.g "000005PR RODI T.R, S.L.") and paste it in column F. The problem is that in column A i have as well empty cells and cells that have date (e.g "2012 02 14-OCT-2011 CN 100725") . Neither the IF/AND nor the "double" if constructs are working . How can I fix this problem ?

Regards.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Christchaaya,

If you want multiple criteria in your IF THEN then you can put the AND between the statements:

If [condition] AND [condition] THEN

Hop this helps
 
Upvote 0
Thank you Vog, works perfectly ;)

Clock thank you for the help but as i said in the first thread i tried as well with the IF/AND but didn't worked :)

Best regards.
 
Upvote 0

Forum statistics

Threads
1,203,244
Messages
6,054,365
Members
444,718
Latest member
r0nster

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top