I'm looking to create a function in Excel/VBA that will look at a range of cells and return a value of TRUE if any of the cells contains a certain character (an asterisk *). There will be some blank cells, some cells will contain text and some may contain text and an asterisk. Can anyone help? Many thanks
相关问题
- Keeping track of variable instances
- How to get the maximum of more than 2 numbers in V
- Excel sunburst chart: Some labels missing
- F#: Storing and mapping a list of functions
- Error handling only works once
相关文章
- Get column data by Column name and sheet name
- Accessing an array element when returning from a f
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- Equivalent to window.setTimeout() for C++
- How can I write-protect the Matlab language?
- Java Equivalent to iif function
Copy and paste the below code into a new module
then use it in the spreadsheet like this
Note:
D1 =
=ConstainsStar(A1:A3)
H1 =
=ConstainsStar(E1:E3)
you can also use the instr function
and to call the function:
use only goto when you cannot do else, usually you don't need it.