Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Grouping records together using a primary key style field

I'm trying to set up a barcode reader, which uploads enetered data into
an excel spreadsheet. The data is copied into excel in sererate
records, but I am struggling to figure out a way to group seperate
records into one single record if they have the same barcode number.
E.g:

Barcode Quantity
AA 2
DD 7
KK 9
AA 44
DD 12

I want this to be automatically changed to:

Barcode QuantityA QuantityB QuantityC
AA 2 44
DD 7 12
KK 9

Is this even possible???

Any help would be appreciated!!!

Thanks,
Chris

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 98
Default Grouping records together using a primary key style field

Hi Chirs,

Have a look at pivot tables.

This will easilly be able to do what you want.

HTH

Simon

chrisnichols87 wrote:
I'm trying to set up a barcode reader, which uploads enetered data into
an excel spreadsheet. The data is copied into excel in sererate
records, but I am struggling to figure out a way to group seperate
records into one single record if they have the same barcode number.
E.g:

Barcode Quantity
AA 2
DD 7
KK 9
AA 44
DD 12

I want this to be automatically changed to:

Barcode QuantityA QuantityB QuantityC
AA 2 44
DD 7 12
KK 9

Is this even possible???

Any help would be appreciated!!!

Thanks,
Chris


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via http://www.officekb.com

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Grouping records together using a primary key style field

That's great, thanks a lot Simon

Chris



smw226 via OfficeKB.com wrote:
Hi Chirs,

Have a look at pivot tables.

This will easilly be able to do what you want.

HTH

Simon

chrisnichols87 wrote:
I'm trying to set up a barcode reader, which uploads enetered data into
an excel spreadsheet. The data is copied into excel in sererate
records, but I am struggling to figure out a way to group seperate
records into one single record if they have the same barcode number.
E.g:

Barcode Quantity
AA 2
DD 7
KK 9
AA 44
DD 12

I want this to be automatically changed to:

Barcode QuantityA QuantityB QuantityC
AA 2 44
DD 7 12
KK 9

Is this even possible???

Any help would be appreciated!!!

Thanks,
Chris


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via http://www.officekb.com


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 98
Default Grouping records together using a primary key style field

Hi Chris,

I just looked at this again and I am glad that I did!

You can use pivot tables in a slightly stange way but it won't tell you
anywhere how to....

if you create a pivot table on your data and have barcode as your row and
quantity in both colum and Data.

This will give you the following:
AA 2 44
DD 7 12
KK 9


If you copy the table (without any totals or column headings and paste the
values into a new sheet, select all of your new data and run the code below
it will move everything along for you....NB: You may have to run this a
couple of times to get it all correct.

Sub deletetheblanks()
For Each Cell In Selection
If Cell.Value = "" Then
Cell.Delete Shift:=xlToLeft
End If
Next Cell
End Sub


HT is of more H!

Simon

chrisnichols87 wrote:
I'm trying to set up a barcode reader, which uploads enetered data into
an excel spreadsheet. The data is copied into excel in sererate
records, but I am struggling to figure out a way to group seperate
records into one single record if they have the same barcode number.
E.g:

Barcode Quantity
AA 2
DD 7
KK 9
AA 44
DD 12

I want this to be automatically changed to:

Barcode QuantityA QuantityB QuantityC
AA 2 44
DD 7 12
KK 9

Is this even possible???

Any help would be appreciated!!!

Thanks,
Chris


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200611/1

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Grouping records together using a primary key style field

I've got a slight problem. I want to select every cell in the two
columns when creating a pivot table. When doing this however, the
following is produced:


Count of 0
AA Total
AA 1
DD 2
HH 1
TT 2
(blank)
Grand Total 6



and not:



Sum of 0
AA Total
AA 78
DD 7
HH 7
TT 11
Grand Total 103


Any idea how I can do this?

Cheers,

Chris



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 98
Default Grouping records together using a primary key style field

Hi Chirs,

Pivot tables do take a bit of getting used to.

In the data field...if you right click and select "Field Settings" you can
change how the data is analysed.





chrisnichols87 wrote:
I've got a slight problem. I want to select every cell in the two
columns when creating a pivot table. When doing this however, the
following is produced:

Count of 0
AA Total
AA 1
DD 2
HH 1
TT 2
(blank)
Grand Total 6

and not:

Sum of 0
AA Total
AA 78
DD 7
HH 7
TT 11
Grand Total 103

Any idea how I can do this?

Cheers,

Chris


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200611/1

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Grouping records together using a primary key style field

Hi Chris

Work on a Copy of your data!!

You could do it in stages.
First sort all your data by Barcode
In cell C2 enter
=IF(A3=A2,B3,"")
in cell D2 enter
=IF(AND(A3=A2,A4=A3),B4,"")
Copy C2:D2 down for the extent of data in column A.

DataFilterAutofilteruse dropdown on column C and Select (Blanks)
Mark the Visible rows and right clickDelete
--
Regards

Roger Govier


"chrisnichols87" wrote in message
ups.com...
I'm trying to set up a barcode reader, which uploads enetered data
into
an excel spreadsheet. The data is copied into excel in sererate
records, but I am struggling to figure out a way to group seperate
records into one single record if they have the same barcode number.
E.g:

Barcode Quantity
AA 2
DD 7
KK 9
AA 44
DD 12

I want this to be automatically changed to:

Barcode QuantityA QuantityB QuantityC
AA 2 44
DD 7 12
KK 9

Is this even possible???

Any help would be appreciated!!!

Thanks,
Chris



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
How do I make my borded automatic black instead of pink? Brenda Excel Worksheet Functions 3 August 11th 06 09:34 PM
Pivot Table Grouping or Calculated Field DCSwearingen Excel Discussion (Misc queries) 2 July 17th 06 04:36 PM
Summarizing field quantities for specific records Charleswdowd Excel Worksheet Functions 0 June 2nd 06 01:12 AM
getting unique records similar to the primary key in access Alok Excel Worksheet Functions 1 January 27th 06 09:08 PM
Deleting specific records [email protected] Excel Discussion (Misc queries) 6 June 22nd 05 11:35 PM


All times are GMT +1. The time now is 09:32 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"