Hello Alteryx Team,
Is Alteryx has the capability to ignore a cell if a certain cell has a specific color? Or if not, replace the value of a certain numeric cell having color inside to null/zero value?
Example A2 in an input file has green color and has 80 written on it. The output will replace 80 to zero because the cell has green color.
Thank you.
@PassION_es I am not aware of this capability (yet). But, one workaround you can make is that you can have a field within your original data set that has the text condition you are looking for predicated off the color (e.g. Cell B2 in this case would say "Green" within that Condition field"). Not exactly the most elegant way of getting around it, but it'll foot the bill for what you are attempting to accomplish.
I don't believe this is possible. Alteryx only imports the data, not the formatting of a cell. This would need to be accomplished in Excel after the fact. Its possible with a VBA macro in Excel and using the Run Command tool to execute a .bat file for the Excel VBA.
hello Cjaneczko,
I think you are right. I tried the run command last year for my vba code but I got errors in the run command button.
Hence, can you help me create a workflow with a run command button to replace values in a color cell to zero? The action in the run command button should be set first before the data gets feed to the other tool in the workflows.
I have found a sample code that is very related to the action I am trying to do. Please see below.
Sub ChangeValueBasedOnCellColor()
Dim rg As Range
Dim xRg As Range
Set xRg = Selection.Cells
Application.DisplayAlerts = False
For Each rg In xRg
With rg
Select Case .Interior.Color
Case Is = 255 'Red
.Value = 1
Case Is = 15773696 'Blue
.Value = 0
End Select
End With
Next
Application.DisplayAlerts = False
End Sub
link: https://www.extendoffice.com/documents/excel/4134-excel-change-value-based-on-cell-color.html
Thank you in advance