I'm moving information from one sheet to another sheet based of开发者_如何转开发f of values in one column on the master sheet. Right now the code pulls rows based off of one value in the source column, but I need to modify it to pull rows matching two values. What I use now is
'If value in column Y ends with "6100", copy to report sheet
If c.Value Like "*6100" Then
Basically instead of just 6100 I need to pull *6100 and *6200. I don't know why I'm not getting it to work. Any simple way to modify this?
Something like this.
Although running a AutoFilter flagging True if the last 4 digits match these two criteira may be more efficient timewise if your code takes a while
If c.Value Like "*6100" Or c.Value Like "*6200" Then
'do stuff
Else
'do other stuff
End If
This may help you out, it is embedding multiple conditional statements into the cell, evaluating the contents of one cell to produce the desired outcomes.
=IF(Q1087<=0.04167,"< 1 Hr",IF(AND(Q1087<=0.2083,Q1087>0.0416),"1 to 5 Hrs",IF(AND(Q1087<=0.4167,Q1087>0.208),"5 to 10 Hrs",IF(AND(Q1087<=1,Q1087>0.4167),"10 to 24 Hrs",IF(AND(Q1087<=2,Q1087>1),"1 to 2 Days",IF(AND(Q1087<=5,Q1087>2),"2 to 5 Days",IF(Q1087>5," > 5 Days","")))))))
精彩评论