- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Good day.
May I ask if there's a better way rather than using If then else if statement on this example. Although those statement works fine but we believe it's not the right way to do it since it makes processing slower
Example
I have current parameters row1A to row10A which has precomputed values (all numerical unit)
I have a selection dropdown list for Pattern (W, X, Y, Z) in text unit
Pattern should be treated as either Z or not Z, since W, X, Y are act as the same
row1A to row10A if less than or equal to 0 should be resulted to 0
Conditions on current If, elseif, then example
This is the current code using If, then statement
If row2A=row1A and pattern <> Z Then
row2A=row1A-1
Elseif row1A <>row2A And row1>row2 And pattern = Z Then
row2A=row1-2
Elseif row1A <>row2A And row1<row2 And pattern = Z Then
row2A=row1A
Elseif row2A <=0 Then
row2A = 0
Else
End if
Same goes on other rows. Looking if possible to use looping command. Thanks by showing the actual code if provided as I'm don't have programming knowledge, only as inventor user.
Solved! Go to Solution.