the column a has string = "final cont"
if cells(1,"a").text = " final cont"
but it does not recognize the final cont
should i cosider space also
hwo do i put it.
Printable View
the column a has string = "final cont"
if cells(1,"a").text = " final cont"
but it does not recognize the final cont
should i cosider space also
hwo do i put it.
yes
" final cont" is not = "final cont"
you can use trim function to remove leading and trailing spaces
trim(" final cont") is = "final cont"
if cells(1,"a").text = trim(" final cont") is not taking as final cont
Try this...
If Ucase(Trim(Range("A1").Value)) = "FINAL CONT" then
If this doesn't work then I need to see your workbook...
it is wrap text FINAL
CONT
BUT THE COLUMN IS THE SAME WITH WRAP TEXT
Can I see your workbook?
Koolsid
here it is wokrbook. thanks
It is not "Final Cont" but "Final Contigency " ;)
so i put using trim it is not working
What is the exact code that you are using?
if cells(3,"c").text = trim(" Final contingency")
Two things....
"Final Contigency " is different from " Final contingency"
1) spelling of Contigency and contingency is different
2) One starts with 'C' and the other starts with 'c'
try
if trim(lcase(cells(3,"c").text)) = trim(lcase(" Final contingency") )
this will remove any space from either end of both and remove all case sensitivity
i tried the same way also it does nor work out, is that any thaing wrap text
Can you upload your original workbook?