• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Script Assistance

sampath

Member
Dear Friend,


I need the following ouputs from mentioned inputs.


INPUTS (Column based Inputs)

[pre]
Code:
S1           S2           S3                 S4
75           586,754      131                132,NA
645          859          785                R55
NA           R65          1022               2022 784
R265         SE**** - *   2022               541 SE**** - *
SE**** - *                2031 SE**** - *
[/pre]
Need OUTPUT

S1 75-645-NA-R265

S2 586-754-859

S3 131-785-1022-2022-2031

S4 132-541-784-2022-NA-2022


Please this is very urgent to our project related issues. kindly help me.
 
Hi Sampath ,


I am not clear on how you have got the output from the input , especially as far as S2 and S4 are concerned ; Can you clarify with more explanations ?


Narayan
 
Dear NARAYANK991,


In Input, S1,S2,S3,S4 is sheet no,and other is part no except SE**** - *.

some time, two part no can come in single cell between the "space". Some time Part no and "SE" Can come in single cell.


The output is, S1 is one cell and other part no is another cell as already mentioned in above. but After SE no should delete.


Thanks for better understanding.


Please help us for VBA script making.


Regards,

Sampath.S
 
Hi Sampath ,


I am no closer to understanding your requirement. If we take your first post , you have posted a table , as follows :

[pre]
Code:
S1           S2           S3                 S4
75           586,754      131                132,NA
645          859          785                R55
NA           R65          1022               2022 784
R265         SE**** - *   2022               541 SE**** - *
SE**** - *                2031 SE**** - *
In your second post , you clarify that S1 , S2 , S3 and S4 stand for the sheet numbers ; I assume that sheet1 contains the following data :

[pre][code]S1
75
645
NA
R265
SE**** - *
Now , you mention that the output should have the sheet number in one cell , and the data in the next cell to the right , concatenating all the data ; your posted output agrees with your statement :

[pre][code]S1 75-645-NA-R265
But now , if we look in the same manner at the data on sheet2 and sheet4 , the output you have posted does not correspond to the above logic , since S2 has the following data :

S2
586,754
859
R65
SE**** - *
[/pre]
based on which , the output should have been :

S2 586-754-859-R65[/code][/pre]
whereas you have posted the following output :

S2 586-754-859[/code][/pre]
A similar discrepancy is there for S4 ; can you clarify ?


Narayan
 
Dear Narayan,


Some time, 586 754 has comeing in single cell, while i coping this part no ( 587, 1202 like that) from PDF and paste to excel, the same manner in SE no also.

if two/three no (586 754) in the same cell, We assumed,

S2 S4

586 132

754 NA

859 R55

R65 2022

SE**** - * 784

541

SE**** - *


Note :In the First post, I mistyed the "," between two number, Actually space can come between two/three no's.


Thank with regards,

Sampath.S
 
Hi Sampath ,


Can you please upload your workbook ? Upload your file to any file-sharing website of your choice ( DropBox , SkyDrive , RapidShare , SpeedyShare , Google Docs ,... ) , give others permission to access your file , and then post the access link in this same topic.


If you cannot upload your file , please send it to me at narayank1026[at]gmail[dot]com.


Narayan
 
Back
Top