### Title

How to create an amount of parentheses based on a numerical variable.

### Post

I am basically making a database that will create the verbiage for a calculation. I need to make an number of parentheses in a row. The amount of parentheses would be based on a variable. For example:

If n = 2 the function would generate: ))

If n = 5 the function would generate: )))))

What text function or other would I use to generate this text based on a variable?

Thanks!

Try:

Substitute ( 10^n - 1 ; "9" ; ")" )

This will work for n up to 404 - for more see:

http://www.briandunning.com/cf/942