I am using this code to change 1's to green and 0's to red. This works fine in Excel, but when I transfer the VBA code to qlikview, it no longer works, giving me the error "Type Mismatch:Range" at the third line. Any help would be appreciated.
Dim v, clr, rng, x
Set rng = Range("Verifier Concat") //Problem at this line with "Type Mismatch"
Well I want to do similiar in Qlikview what I have done in Excel; turn a string of 1's and 0's such as 10010 into two different colours, red and green. It would be helpful if macros could be avoided altogether
Just to clarify, in Excel we set the range to column 'B', which included the values like 10001, 111, 000, etc. using the line:
Set rng = Range("B")
We would color code 1's with Green and 0's with Red, like in the image below. After looking up in Qlik Community, we realized that QV could not implement the individual character formatting like you said, so we pulled the same Excel field into QV as a column called 'Verifier Concat', and decided to go the macro route to try and implement similar functionality.
So in short, we just need to set the 'rng' variable to the 'Verifier Concat' field, instead of column 'B', on which we can apply the color coding for individual characters.