ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   looking for logic guidance (https://www.excelbanter.com/excel-programming/383434-looking-logic-guidance.html)

Bruce

looking for logic guidance
 
First, I am using excel 2003.


I have data that is in a "flat" format meaning that data is like:
NAME MAILING SHIPPING
name1 address1-a Address2-b
name2 address1-c Address2-d
name3 address1-e address2-f

There may be duplicates of name and address1 such as:
NAME MAILING SHIPPING
name1 address1-a Address2-b
name2 address1-c Address2-d
name2 address1-c address2-f
name3 address1-g address2-h

What I need to do is get data from the previous example into the following
format while I need to know if the address is from mailing address or
billing address
NAME ADDRESS TYPE
name1 address1-a MAILING
name1 Address2-b SHIPPING
name2 address1-c MAILING
name2 Address2-d SHIPPING
name2 address2-f SHIPPING
name3 address1-g MAILING
name3 Address2-h SHIPPING


I am looking for how I would do this.... How should the logic be, or some
samples of how to break this dow. (this is far simplified of my actual
data, but shows what I need to do (i hope!))


Thanks
Bruce



Tom Ogilvy

looking for logic guidance
 
Simple way is to copy the data from columns 1 & 2 to a new sheet
Select the top cell. Hold down the shift key and select the bottom cell
In the formula bar enter
MAILING
then Ctrl+enter

Below this data, copy columns 1 and 3
put in the third column as above with SHIPPING

Sort the data on name, address, 3rd column

See Chip Pearson's page for techniques of working with duplicate

http://www.cpearson.com/excel/duplicat.htm

--
Regards,
Tom Ogilvy


"Bruce" <oleexpres.at.johnsonclan.net wrote in message
...
First, I am using excel 2003.


I have data that is in a "flat" format meaning that data is like:
NAME MAILING SHIPPING
name1 address1-a Address2-b
name2 address1-c Address2-d
name3 address1-e address2-f

There may be duplicates of name and address1 such as:
NAME MAILING SHIPPING
name1 address1-a Address2-b
name2 address1-c Address2-d
name2 address1-c address2-f
name3 address1-g address2-h

What I need to do is get data from the previous example into the following
format while I need to know if the address is from mailing address or
billing address
NAME ADDRESS TYPE
name1 address1-a MAILING
name1 Address2-b SHIPPING
name2 address1-c MAILING
name2 Address2-d SHIPPING
name2 address2-f SHIPPING
name3 address1-g MAILING
name3 Address2-h SHIPPING


I am looking for how I would do this.... How should the logic be, or some
samples of how to break this dow. (this is far simplified of my actual
data, but shows what I need to do (i hope!))


Thanks
Bruce






All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com