Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Criteria = cell contents

Status
Not open for further replies.

jonsi

IS-IT--Management
Dec 20, 2001
1,989
DE
I have an Excel data table that contains information on workplace accidents.

I have to make this workbook available to other users who do not understand simple Data Filters - (I think) macros assigned to radio buttons is the best (simplest) way for me to get them to make their filter choices and return the correct information avoiding any errors.

I presently have Field:=6 Criteria1:="Stores" to list only those accidents that occurred in Stores (where Field 6 is the location column and Stores is listedd #time within that column).

Apart form making a macro for each/every possibility, can I make a macro that uses Cell contents as Field and Criteria1? If I can, what's the syntax?

 
dim criteria1 as string
criteria1=activecell.value
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top