Hi,
I have this code which is not running the possible reason which can be is contents of column 'S' has two spaces after which I am not able to remove,pl advice
![]()
Please Login or Register to view this content.
Hi,
I have this code which is not running the possible reason which can be is contents of column 'S' has two spaces after which I am not able to remove,pl advice
![]()
Please Login or Register to view this content.
Last edited by arnab0711; 01-29-2011 at 02:16 PM.
This might help
![]()
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Hi,
I regret to say,the new code is not working,but I have attached the "master" spreadsheet which might help you in decision making.
Strange problem.
If I change your code:
adding a range select comand:![]()
Please Login or Register to view this content.
you can loop through all the case statment so perhaps your code will work with this modification.![]()
Please Login or Register to view this content.
HTH
Alf
@ Alf you get 6 of the strap for suggesting using select ...
@ arnab0711
There seems to be two problems that I can see
1/. You begin the code with a With Statement, then don't refer to it, you have "missed the point" so to speak!
2/. The Data in Column S is not e.g. IN it is actually IN & Char(160)&Char(160), I suspect this because the data is from the web or similar
If you check in the intermediate pane
this will return 4, not 2 as expected.![]()
Please Login or Register to view this content.
Check
and![]()
Please Login or Register to view this content.
Both return 160![]()
Please Login or Register to view this content.
In this case the Left statement I have used solves the problem, (all cases are 2 characters long)
Better to clean the original data with a Substitute formula in your workbook
=SUBSTITUTE(S1,CHAR(160),"")
or maybe find and replace Char(160) with ""
Try this
![]()
Please Login or Register to view this content.
Hope this helps
Last edited by Marcol; 01-29-2011 at 05:07 PM.
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks