+ Reply to Thread
Results 1 to 6 of 6

Cel value length modifying macro :(

  1. #1
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Cel value length modifying macro :(

    Hi Guys,

    Its really different all the other posts

    i want to create a macro for reducnmg teh cell values length.

    for example
    A B c
    1 y LLU123456 -
    2 j LLU345678 -
    3 m LLU987456 -
    4 s LLU456123 -

    As per teh above..

    If teh cell A contains "Y" and "J" teh Value of C should be 8 digits value.(ie.. Should reduce a digit of B and pated here(LU12345).

    If the cell A contains M and S teh value of C should be 6 digits value.(ie..should reduce the 3 didgit from teh B value and pasted.. (1978456))

    Can someon ehelpw me here sort thsi out ?? :'(

    My cry for your help.

    Per day i will have to correct 300 cells:'( My cry for your help..!!

    Many thanks in advance.
    Safi.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Cel value length modifying macro :(

    Safi,
    I would be easier to see if you could attach a sample

  3. #3
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Cel value length modifying macro :(

    Hi AB,

    Tahnsk for teh quick turn around.

    As per teh atatched

    If cell C contains SKY or BT or OPAL then teh G value should be : 6 digit
    If Cell C contains Virgin then the G value should be : 8 digit.

    TIA
    Safi.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Cel value length modifying macro :(

    You references in your post were completely different from the attached workbook. So i just made a bunch of assumptions. In addition, I didn't bother with any error checking so if your real sheet differs from your example you may run into errors. Also, it wasn't clear to me which of the numbers you wanted to keep so I just did the leftmost of the number. Try:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Cel value length modifying macro :(

    Hi,

    Really sorry for that..!! (I know my english is very poor)

    I have used teh above but it doesnt modifying anything..

    I will try to explain you now..

    As per the above attachment..

    I ahve some 9 didgit vlue in the entire D range,it should be copied another cell (in"G") as if the cell value of E = BT , SKY or OPAL then the digit long of G should be : 6.

    Hope thsi makes sense now

    TIA
    Safi.

  6. #6
    Forum Contributor
    Join Date
    01-25-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    112

    Re: Cel value length modifying macro :(

    CAn some one help me ?
    Thansk,
    Safi.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Cel value length modifying macro :(

    Explain more about length of digits or attach a sample with the result that you want.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1