![]() |
|
#1
|
|||
|
|||
|
Hi,
I am applying a column filter then adding a value to an adjacent column. I problem I am having is when the filter returns no value the code still adds a value to the adjacent column. This creates a new task line. The code I need help with is if the filter returns no values to skip to next filter in the code. I have added some code below. Code:
'''''Examples of a filter returning no value and adding format and text to adjacent column creating a new task
'''''When filter returns no value I need to skip to next set of code
'''''Skip to next if no value returned from filter
SetAutoFilter FieldName:="Text30", FilterType:=pjAutoFilterCustom, Test1:="contains", Criteria1:="ALS"
SetAutoFilter FieldName:="Resource Names", FilterType:=pjAutoFilterIn, Criteria1:="PC-CPINSP"
SelectTaskColumn Column:="Text3"
Font32Ex CellColor:=13159680
SetTaskField Field:="Text3", Value:="CLASSIFIED"
FillDown
FilterClear
'''''Skip to next if no value returned from filter
SetAutoFilter FieldName:="Text30", FilterType:=pjAutoFilterCustom, Test1:="contains", Criteria1:="ALS"
SetAutoFilter FieldName:="Resource Names", FilterType:=pjAutoFilterIn, Criteria1:="PC-CRNINSP"
SelectTaskColumn Column:="Text3"
Font32Ex CellColor:=13159680
SetTaskField Field:="Text3", Value:="Crane"
FillDown
FilterClear
'''''Skip to next if no value returned from filter
SetAutoFilter FieldName:="Text30", FilterType:=pjAutoFilterCustom, Test1:="contains", Criteria1:="ALS"
SetAutoFilter FieldName:="Resource Names", FilterType:=pjAutoFilterIn, Criteria1:="PC-DRONE"
SelectTaskColumn Column:="Text3"
Font32Ex CellColor:=13159680
SetTaskField Field:="Text3", Value:="Drone"
FillDown
FilterClear
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Filtering | Zetta | Excel | 0 | 07-29-2017 12:08 PM |
| Microsoft Project Server, Microsoft Project Online and Project Web App - Whats the difference? | chocolateCupcakes | Project | 1 | 02-11-2017 12:25 PM |
| Filtering Tasks | timvb85 | Outlook | 0 | 11-15-2010 08:30 PM |
| Filtering out CC's | arzsupra | Outlook | 0 | 03-11-2008 05:55 PM |
| contacts filtering | bubba622 | Outlook | 0 | 05-01-2006 03:41 PM |