Hi all,
I wrote a vba app that opens a master workbook, it does a complicated IF statement to filter out rows based on column criteria
It then saves the filtered rows to another workbook , closes out the master, closes and saves out the subset of data as "work list"
this all works great but now I need to have several other "work lists" created and each one has a different set of criteria.
So I updated my user form to have 3 checkboxes , the user can now select which "work list" they want or All 3.
I know i can just repeat my code 3 times but isn't there a smarter way to code this scenario
I want to be able to stick the IF statement in a variable just like we can do with SQL in ASP? this way all i need to do is swap out which
mylogicstring i need
Dim mylogicstring1 as string
dim mylogicstring2 as string
' pseudo code example
mylogicstring = "IF column G = "beer mugs" then IF column H = "" OR column P = "" OR Column S <> Column T end if"
do while column A <> ""
mylogicstring
loop
thanks !
Dave
I wrote a vba app that opens a master workbook, it does a complicated IF statement to filter out rows based on column criteria
It then saves the filtered rows to another workbook , closes out the master, closes and saves out the subset of data as "work list"
this all works great but now I need to have several other "work lists" created and each one has a different set of criteria.
So I updated my user form to have 3 checkboxes , the user can now select which "work list" they want or All 3.
I know i can just repeat my code 3 times but isn't there a smarter way to code this scenario
I want to be able to stick the IF statement in a variable just like we can do with SQL in ASP? this way all i need to do is swap out which
mylogicstring i need
Dim mylogicstring1 as string
dim mylogicstring2 as string
' pseudo code example
mylogicstring = "IF column G = "beer mugs" then IF column H = "" OR column P = "" OR Column S <> Column T end if"
do while column A <> ""
mylogicstring
loop
thanks !
Dave