View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tracktraining tracktraining is offline
external usenet poster
 
Posts: 68
Default displaying multiple inputs

Hi All,

How do i go about displaying a user input string into several cells?

Example:
User input: cat, dog, horse, chicken

A B C D E F
1 cat dog horse chicken

I know i can use the following code to split the words, but i just don't
know how to display it into each cell, also, sometime the user may enter 1
word, sometime 3 words:
mySplit = Split(productStrUCASE, ",")
For iCtr = LBound(mySplit) To UBound(mySplit)
myVal = Trim(mySplit(iCtr)) 'remove any
leading/trailing spaces
wordkey = myVal
wordkeyUCASE = UCase(wordkey)
write to cell
Next iCtr


Also, how would i count a row that has the word "cat" in column L and the
word "yes" in column K?

I have the following countif code, but the keywords are hardcode in, is
there a way to not hardcode the keywords in but have it as a variable
instead?

Range("AM10").FormulaArray =
"=COUNT(IF(ISNUMBER(SEARCH(""*Cat*"",R[-8]C[-34]:R[600]C[-34])),IF(ISNUMBER(SEARCH(""*yes*"",R[-8]C[-27]:R[600]C[-27])),1)))"


thanks a lot for your help!
tracktraining

--
Learning