How to move data in Column A into seperate columns / rows

I

iain.sanderson

Hi All,

I have just started a book website, part of the site is a database. To
get my books into the database I need a spreadsheet. I am supplyed a
file that contains every book that is in stock.

The trouble is that when I try to import this into excel it puts
everything into one column.

Below is a sample of the file:

**START
IB 0702026174
BI hardback
AU EVANS, WILLIAM CHARLES
BC MMG
CO UK
EI 15REV ED
IU 275ILLS
PD 20011213
NP 600
RP 62.99
RI 62.99
RE 62.99
DI 286 x 229
PU ELSEVIER HEALTH SCIENCES
YP 2001
RC Y
RS ACADEMIC/SPECIALIST
TI TREASE AND EVANS PHARMACOGNOSY
DE Serves as the encyclopaedic reference work on pharmacognosy, the
study of those natural substances, principally plants, that find a use
in medicine. This book balances between classical and modern aspects of
this branch of science, and covers the importance of complementary
medicines, including herbal, homeopathic and aromatherapy.
EA 9780702026171
RF R
WE 1780
SG 1
GC O00
**
IB 0862726921
BI paperback
AU BURTON, JOHN
BC PSVW7
CO UK
IL OLIVER, WILLIAM
IU ILLUSTRATIONS, COLOUR PHOTOS
PD 19911130
NP 192
RP 10.99
RI 10.99
RE 10.99
DI 225 x 123
PU KINGFISHER BOOKS LTD
YP 1991
RC G
RS GENERAL
SR FIELD GUIDES
TI FIELD GUIDE TO THE MAMMALS OF BRITAIN AND EUROPE
DE A guide to over 160 species of mammals from Britain and Europe.
Concise descriptions summarize the key physical features, behaviour and
range of each main animal, as well as distinguishing similar species.
Also included is information on life cycles and conservation status.
EA 9780862726928
RF R
WE 378
SG 3
GC C05
**
IB 0237526301
BI paperback
AU LEVINE, KAREN
BC YFY
CO UK
IU ILLUSTRATIONS, PHOTOS
PD 20030627
NP 128
RP 4.99
RI 4.99
RE 4.99
DI 198 x 130
PU EVANS PUBLISHING GROUP
YP 2003
RC C
RS CHILDREN
TI HANA'S SUITCASE
DE In March 2000, a suitcase arrived at a children's Holocaust
education centre in Tokyo. It belonged to a orphan girl called Hana
Brady. Everyone was desperate to discover the story of Hana - Who was
she? What had happened to her? This is her true story.
EA 9780237526306
RF R
WE 198
SG 4
GC C09
**
IB 0099321009
BI paperback (A format)
AU REEMAN, DOUGLAS
BC FBC
CO UK
EI NEW ED
PD 19830908
NP 368
RP 6.99
RI 6.99
RE 6.99
DI 178 x 110
PU ARROW BOOKS LTD
YP 1983
RC G
RS GENERAL
TI BADGE OF GLORY
DE It was an age of Empire, an age of contrast, and an age of dramatic
change - and one which would determine the destinies of nations as well
as of men. This is a novel of an enthralling and colourful saga,
spanning 150 years in the history of a great seafaring family and the
tradition in which they served.
EA 9780099321002
RF R
WE 215
GC F09
**
IB 1857152816
BI hardback
AU ALLENDE, ISABEL
BC FBC
CO UK
EI NEW ED
PD 20050310
TP THE
NP 520
RP 10.99
RI 10.99
RE 10.99
DI 210 x 133
PU EVERYMAN'S LIBRARY
YP 2005
RC G
RS GENERAL
SR EVERYMAN'S LIBRARY CONTEMPORARY CLASSICS
TI HOUSE OF THE SPIRITS
TR BOGIN, MAGDA
PI Chilean writer Isabel Allende's classic bestseller is a richly
symbolic
PI family saga that is also the riveting story of an unnamed Latin
American
PI country's turbulent history. Translated by Magda Bogin, introduced
by
PI Christopher Hitchens.
EA 9781857152814
RF R
WE 562
SG 3
GC F00


Each pair of letters defines a new Column then when it gets to the two
** it is the start of a new row.

I am not sure in what direction to go, does anyone have any ideas ?
 
T

Tim Williams

Open the file and read it in line by line.

if
starts with "**" then go to the next line on your worksheet
else
look up first two characters in a table to get a column number
and put the line contents (minus first 3 char) in that column
end if


Tim
 

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