LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default formatting question

Hi,

If column "A" contains the make than look through all entries in column A

For rw = Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).row to 2 step -1
If cells(rw,1) = cells(rw-1,1) then
cells(rw,1).clearcontents
else = cells(rw,1)<cells(rw-1)
Rows(rw).Insert
cells(rw,1)=cells(rw+1,1)
cells(rw+1,1).clear contents
end if
next

You will need additional code for row 1 if it also contains a car make.

add to end of code

Rows(1).Insert
cells(1,1)=cells(2,1)
cells(2,1).clear contents

rand451

"David" wrote in message
...
Hi,
Seems the best you will get is:
BMW:
Yr/Make/Vin/Who/When/Price
Yr/Make/Vin/Who/When/Price
Yr/Make/Vin/Who/When/Price

Lex
Yr/Make/Vin/Who/When/Price
Yr/Make/Vin/Who/When/Price
Yr/Make/Vin/Who/When/Price
Etc.
This is more parsing, based on the detail.
BMW1999 325CI VIN123456789101236JohnSmith 4500020051212
The line above would have to be worked on. Chances are someone would have
to
work through enough examples to do this consistantly. The data all appears
to
be there probobly working through your real data is the only way someone
will really be able to help you. A lot Text functions and stuff to look
at.

Thanks,


"microsoft.news.com" wrote:

the data below is the acutal data coming from the text file. I have a C#
app
that is getting the data and populating my excel spread sheet fine. But
what
I want is to Group the Make and only see the make once in the spreadsheet
with all the data linked to it instead of seeing multiple lines for the
make.


in my excel file i'm seeing
BMW
BMW
Lexus
VW
BMW
Lexus

and I want
BMW
YEAR MAKE VIN who bought it when they bought it and price

Lexus
YEAR MAKE VIN who bought it when they bought it and price

I dont' want
BMW
BMW
Lexus
BMW
etc.


"David" wrote in message
...
Hi,
If it is coming through s you indicate, only with more lines and
vehicles,
it appears you could sort it as it is? The make is the first part of
each
line, all the bmws, lexus, etc should group naturally. What have you
attempted so far? It may not be possible to answer your question with
out
your specific data in a file. Once it is sorted, you have indicated you
want
more things done? The only thing I see that is consistant and can be
searched
in these strings in the letters "VIN", possibly there is consistancy in
the
spacing? You want at this point to put specific information into
columns?

Thanks,

"microsoft.news.com" wrote:

my data in the text file looks like this:

BMW1999 325CI VIN123456789101236JohnSmith 4500020051212
Lexus2004ES300 VIN123456789101236BarneyRubble 2566020051214
BMW2005 325C VIN123456789101236BettySmith 6950020050105

I'm already parsing it out, I just now want to group it by make
"David" wrote in message
...
Hi,
You are going to have to be more specific. What information are you
trying
to link to? What fields will be in the linked files? Does the text
file
only
contain the general make of a vehicle? To link to another file you
will
need
a unique ID for each text record, like the VIN number to do a lookup
to
and
pull specific information. You might be able to set something up on
a
FIFO
inventory basis or something similar to that, if all you have is the
general
make.

Thanks,

"microsoft.news.com" wrote:

I'm creating a Excel spreadsheet on the fly using C# with data from
a
text
file.
My question is how can I add Groups to the spreadsheet and add some
formatting?

Example:
my text file has cars in it (these can change daily)
BMW
Lexus
VW
GM
Chevy

so in my excel file how can i show
BMW



Lexus



VW


Gm


Chevy

and show information pertaining to that make of car? I have dates,
prices,
etc for each make. I want to group them all together so i don't see
BMW
20
times or VW 20 times, I want to see BMW, VW once and then show all
the
data
linked to the make.











 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting question Belinda7237 Excel Worksheet Functions 1 November 11th 08 12:37 AM
Formatting question Vic Baron New Users to Excel 3 April 6th 08 02:54 AM
Formatting Question Zecarioca Excel Discussion (Misc queries) 4 August 23rd 06 10:30 PM
Formatting Question Jared Excel Discussion (Misc queries) 1 July 13th 06 08:29 PM
Formatting Question Metalteck Excel Discussion (Misc queries) 1 July 15th 05 05:37 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"