# Excel fill data as per criteria

Hello Experts,
I have attached an Excel, which contains Data in the first column as raw data.
The data is starting with some identifiers as: Alphabet, Roman Number, Number, Small Alphabet & Article No.

I want to separate the data in different column as per the starting value of the data, I have made columns to demonstrate what exactly is the end result.

The last column is called Check, which actually should provide the result if the values in column A are contained somewhere from column C to column G.

A
Sample.xlsx
LVL 11
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Excel & VBA ExpertCommented:
Try this.....

In A3
``````=IF(AND(ISNUMBER(MATCH(CODE(LEFT(\$A3,1)),{73,86,88,76},0)),LEFT(C\$1,5)="Roman"),\$A3,IF(AND(CODE(LEFT(\$A3,1))>=65,CODE(LEFT(\$A3,1))<=90,MID(\$A3,2,1)=".",C\$1="Alphabet"),\$A3,IF(AND(ISNUMBER(LEFT(\$A3,1)+0),C\$1="Number"),\$A3,IF(AND(CODE(LEFT(\$A3,1))>=97,CODE(LEFT(\$A3,1))<=122,LEFT(C\$1,5)="Small"),\$A3,IF(AND(LEFT(\$A3,3)="Art",C\$1="Article No."),\$A3,"")))))
``````
And then copy across to column G and down the rows.

For details refer to the attached workbook.
Sample.xlsx
0
IT Services ConsultantCommented:
^ Check cells [C4] & [D5].  There is a mismatch in the requirements.

The prefix "I." is being detected as being in the "Alphabet" column & the "Roman (Numeral)" column; as you would expect.

Should the "Roman" check be in advance of everything else &, hence, is any valid Roman Numeral symbol (I, V, X, L, C, D, &/or M) invalid within the "Alphabet" column?

Similarly, cell [D8] shows "II." as a valid "Roman" entry.

Hence, should any valid Roman Numeral (i.e. any numeric quantity in Roman Numeral form) be just in the "Roman" column?

That is, if the prefix to a value in column [A] contains a string of Roman Numeral symbols, but is not actually a valid Roman Numeral, does that mean that the column is "Alphabet" (only)?
1
Author Commented:
Looks Great!!!
Give me a day to test as I have to test.

Thanks, A
0
IT Services ConsultantCommented:
A: Please see my reservations within the comment immediately before your last comment (above).
0
Excel & VBA ExpertCommented:
@fanpages
Yes you are right. My bad that I didn't notice that. Thanks for pointing this out. :)

@Ackles
Please find the workbook with the updated formula and see if you get the desired output.
Sample.xlsx
1

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
sktneer,
Looks Great!

@fanpages,
Thanks!
1
Excel & VBA ExpertCommented:
Thanks. You need to test it to see if you get the desired output with all the possible input in col. A.
0
IT Services ConsultantCommented:
No problem, guys :)
0
Author Commented:
Gentlemen,
I have another stumble...
I have the export for the same stuff, but since data is from a text file it's spread across various columns...
Is there a formula to say, look from column B to column F & if you find something cut it & put in column A?

A
0
Excel & VBA ExpertCommented:
Well that's completely a different question altogether.

Would be better if you mark this question as Solved by accepting one of the solutions provided as your original question has been already answered here and open another question with your new requirement along with a sample workbook. This way your new question will get more attention from the experts here.
0
Author Commented:
Agreed!!!
Will do now.
A
0
Author Commented:
Thanks a lot, it seems so far to be Excellent!!!
A
0
Author Commented:
0
Excel & VBA ExpertCommented:

As you can see that the experts have already responded to your new question. :)
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.