Extracting Data

K

klafert

I have a spreadsheet with 390 rows. In one column I have data such as this:


6" MARGINATA UPC#200653

Some of the lines have UPC# and some don't. The ones that do I would like
to extract out to another column. Thanks for any help!!!
 
D

Don Guillett

data>filter>autofilter>filter on column desired>custom>contains>upc
voila
or a looping macro using if INSTR
or a formula
=IF(ISERROR(SEARCH("upc",H2)),"",H2)
 
K

klafert

I am sorry guess I wasn't completely clear, I just want to extract the UPC
Code Number.
 
K

klafert

I was using the formula, which worked but I only want the UPC Code #
extracted not the whole column - thanks
 
D

Don Guillett

=IF(ISERROR(SEARCH("upc",H2)),"",MID(H2,SEARCH("upc",H2),FIND("
",H2,SEARCH("upc",H2)-1)))
 
K

klafert

This is the formula I used and I get a Value Error

=IF(ISERROR(SEARCH("upc",b5)),"",MID(b5,SEARCH("upc",b5),FIND("
",b5,SEARCH("upc",b5)-1)))
 
D

Don Guillett

If desired, send your file to my address below along with this msg and
a clear explanation of what you want and before/after examples.
 
J

Jacob Skaria

=IF(ISERROR(SEARCH("upc",B5)),"",MID(B5,SEARCH("upc#",B5),LEN(B5)))

OR

=IF(ISERROR(SEARCH("upc",B5)),"",MID(B5,SEARCH("upc#",B5)+4,LEN(B5)))

If this post helps click Yes
 
R

Rick Rothstein

I should explain... my formula assume the UPC number is always located at
the end of the text.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top