View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
rjr rjr is offline
external usenet poster
 
Posts: 50
Default Removing columns and rows from an imported worksheet

Thanks for responding,
When you say you want those columns removed, do you mean deleted (as in
GONE) or merely hidden?

The columns that I want removed would be gone leaving only the two columns
left to provide the data.

You say "process" and "capture". Do you mean you want ALL other rows
deleted (as in GONE) or merely hidden?

The rows would need to be "sorted" or better comment, if they fit the
criteria of "I need to process only the CO Code
that has 3DFGU; 3DFGV; 3DFGW AND 3DFGX. "

I take it that you want to keep all those rows that have, as the first 5
characters in Column F, any of the listed branches. Is that right?

YES; Any rows that have these combo's should stay, with the remainder not
fitting the criteria being removed as in "Gone". When doing the "sort" for
this group of four there will be others included as the criteria always has
an additional two characters in them.

This may help: 3DFGUXA; 3DFGUWE; 3DGUIS; 3DHUIS; 3DHUON etc.
the first 3 would show up under the 3DFGU and the last two would be
discarded because they don't fit in the criteria.

I take it that you want to keep all those rows that have, as the first 5
characters in Column F, any of the listed branches. Is that right?

YES
The first row holds the header and it will be reduced to : "AGING" and "CO
CODE"

Summary: I should end up with only the 4 codes listed under the CO CODE, and
would like a subtotal of each main branch and it should represent how many
entries for that CODE.
Under Aging, I would need to have the subtotal show the oldest amount of
days in that group. While the group may have aging days of 1,3,6,8,14, & 23;
I would want it to show the 23 as the oldest aging date. I was able to use
the MAXA function but don't know how to include it in a macro or
programming.

Thanks, BOB
"Otto Moehrbach" wrote in message
...
rjr
When you say you want those columns removed, do you mean deleted (as in
GONE) or merely hidden?
You say "process" and "capture". Do you mean you want ALL other rows
deleted (as in GONE) or merely hidden?
I take it that you want to keep all those rows that have, as the first 5
characters in Column F, any of the listed branches. Is that right?
When you say "process", what do you want done with the remaining rows?
What row holds the headers? HTH Otto
"rjr" wrote in message
news:HBckh.10418$_X.7893@bigfe9...
Others have helped me with this but my questions kept modifying it. This
is a request for all programming that I need to work on these worksheets.

I thank you in advance for any help offered.



I have an exported csv format opened in Excel. It consists of varying
numbers of columns with headers. I may have between 5 and 200 rows in
this document.

The layout is like this:

A B C D E F G
H I

ID STATUS AGING REP SUB REP CO CODE DATE
NAME FOL DATE

1 3454 OPEN 14 0 0 3DFGTYU 01
0 0

2 9876 OPEN 10 0 0 3DFGUYV 01
0 0

3 3354 OPEN 07 0 0 3DFGTYU 01
0 0

4 9976 OPEN 00 0 0 3DFGXYV 01
0 0

5 9344 OPEN 02 0 0 3DFGAIU 01
0 0

6 9556 OPEN 04 0 0 3DFGUYD 01
0 0



I would like to do the following if possible in coding:

Upon activating the macro I would like to remove columns I, H, G, E, D, B
& A. This leaves me with C & F remaining. As column shows there are
various codes located in this column. I need to process only the CO Code
that has 3DFGU; 3DFGV; 3DFGW AND 3DFGX. I always need to capture only
these main codes from the CO CODE column. Please note that the code I
need DOES NOT Include the last two letters that are shown in the column.
This code represents the main branch and the additional two letters
indicate sub branches. I have a need to sort main branch AND the sub
branches, but there can be as many as 24 sub branches. Any other codes
outside of the main ones should be eliminated.