Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jas Jas is offline
external usenet poster
 
Posts: 42
Default truncate numbers

Hi All. I have a some number ranges that I need to reduce down taking the
number and another variable into consideration. For example, the following
list:

1234 A
123 A
12 B
12345 A

can all be reduced down to:

12 B
123 A

Is there a way to do this in excel so that it goes through the list and
shortens a list down so that it contains only unique entries?

thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default truncate numbers

Hi Jas,

Without VBA, Sort using the second cloumn as the primary
key and the first column as the secondarykey. Then apply the
Advanced Filter to the second column, selecting the Unique
values option.

If you need to automate this, turn on the macro recorder while
you perform these steps manually,


---
Regards,
Norman



"Jas" wrote in message
...
Hi All. I have a some number ranges that I need to reduce down taking the
number and another variable into consideration. For example, the
following
list:

1234 A
123 A
12 B
12345 A

can all be reduced down to:

12 B
123 A

Is there a way to do this in excel so that it goes through the list and
shortens a list down so that it contains only unique entries?

thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
Jas Jas is offline
external usenet poster
 
Posts: 42
Default truncate numbers

I dont think this will work because I need it to keep shortening the
combination of the 2 fields until it reaches the lowest common combination.
For example, the list given below:

Column A Column B
001264537 276
001264538 276
001264539 276
001264581 276
001264582 276
001264583 276
001264584 276
001264729 276
001264772 276
001340277 276
001340332 276
001340344 276
001340473 276
001340474 276
001340998 276

would become just 2 entries 001264 276 and 001340 276 (minimum digit length
of column A is 6 characters)

Thanks

"Norman Jones" wrote:

Hi Jas,

Without VBA, Sort using the second cloumn as the primary
key and the first column as the secondarykey. Then apply the
Advanced Filter to the second column, selecting the Unique
values option.

If you need to automate this, turn on the macro recorder while
you perform these steps manually,


---
Regards,
Norman



"Jas" wrote in message
...
Hi All. I have a some number ranges that I need to reduce down taking the
number and another variable into consideration. For example, the
following
list:

1234 A
123 A
12 B
12345 A

can all be reduced down to:

12 B
123 A

Is there a way to do this in excel so that it goes through the list and
shortens a list down so that it contains only unique entries?

thanks!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default truncate numbers

Hi Jas,

My suggestion works for me using the data and the scenario
originally described by you.

I do not understand the new data taht you show or the results
which you indicate.

More particularly, you statement:

would become just 2 entries 001264 276 and 001340 276 (minimum digit
length
of column A is 6 characters)


is unclear to me, even after rereading it,

---
Regards,
Norman



"Jas" wrote in message
...
I dont think this will work because I need it to keep shortening the
combination of the 2 fields until it reaches the lowest common
combination.
For example, the list given below:

Column A Column B
001264537 276
001264538 276
001264539 276
001264581 276
001264582 276
001264583 276
001264584 276
001264729 276
001264772 276
001340277 276
001340332 276
001340344 276
001340473 276
001340474 276
001340998 276

would become just 2 entries 001264 276 and 001340 276 (minimum digit
length
of column A is 6 characters)

Thanks

"Norman Jones" wrote:

Hi Jas,

Without VBA, Sort using the second cloumn as the primary
key and the first column as the secondarykey. Then apply the
Advanced Filter to the second column, selecting the Unique
values option.

If you need to automate this, turn on the macro recorder while
you perform these steps manually,


---
Regards,
Norman



"Jas" wrote in message
...
Hi All. I have a some number ranges that I need to reduce down taking
the
number and another variable into consideration. For example, the
following
list:

1234 A
123 A
12 B
12345 A

can all be reduced down to:

12 B
123 A

Is there a way to do this in excel so that it goes through the list and
shortens a list down so that it contains only unique entries?

thanks!






  #5   Report Post  
Posted to microsoft.public.excel.programming
Jas Jas is offline
external usenet poster
 
Posts: 42
Default truncate numbers

What I need it to do is to keep taking off a digit from the right of the data
in column A until the combination of column A and B is unique. The problem
is not that I cant find unique entries, the proble is that I need to find the
"Parent" of a set of numbers. so the parent of the list below (based on 2
variables) is 001264 and 001340. These both have a column B value of 276.

Does this make any more sense?

"Norman Jones" wrote:

Hi Jas,

My suggestion works for me using the data and the scenario
originally described by you.

I do not understand the new data taht you show or the results
which you indicate.

More particularly, you statement:

would become just 2 entries 001264 276 and 001340 276 (minimum digit
length
of column A is 6 characters)


is unclear to me, even after rereading it,

---
Regards,
Norman



"Jas" wrote in message
...
I dont think this will work because I need it to keep shortening the
combination of the 2 fields until it reaches the lowest common
combination.
For example, the list given below:

Column A Column B
001264537 276
001264538 276
001264539 276
001264581 276
001264582 276
001264583 276
001264584 276
001264729 276
001264772 276
001340277 276
001340332 276
001340344 276
001340473 276
001340474 276
001340998 276

would become just 2 entries 001264 276 and 001340 276 (minimum digit
length
of column A is 6 characters)

Thanks

"Norman Jones" wrote:

Hi Jas,

Without VBA, Sort using the second cloumn as the primary
key and the first column as the secondarykey. Then apply the
Advanced Filter to the second column, selecting the Unique
values option.

If you need to automate this, turn on the macro recorder while
you perform these steps manually,


---
Regards,
Norman



"Jas" wrote in message
...
Hi All. I have a some number ranges that I need to reduce down taking
the
number and another variable into consideration. For example, the
following
list:

1234 A
123 A
12 B
12345 A

can all be reduced down to:

12 B
123 A

Is there a way to do this in excel so that it goes through the list and
shortens a list down so that it contains only unique entries?

thanks!






Reply
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
Truncate Elizabeth Excel Discussion (Misc queries) 4 November 18th 09 09:50 PM
Truncate a series of numbers Carrie_Loos via OfficeKB.com Excel Worksheet Functions 3 September 9th 09 10:55 PM
How do I truncate something like this? ckeys Excel Discussion (Misc queries) 6 December 30th 06 05:49 PM
truncate numbers from millions to thousands afreije74 Excel Worksheet Functions 3 September 16th 06 12:09 AM
Truncate Steven Excel Programming 11 April 20th 04 12:11 PM


All times are GMT +1. The time now is 11:26 AM.

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

About Us

"It's about Microsoft Excel"