Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default grouping rows

I export our inventory report into excel. In column A we have out serial
numbers and column B is our part numbers and column C is our quantity. The
part number is only listed once in column B then in the rows below the part
number in column A is the serial numbers for the part. Is there a vb program
that could automatically highlight the serial numbers for a part number and
group them together so that I can then manipulate my sheet with out loosing
the serial numbers that go along with the part numbers?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default grouping rows

If the part number appears only once in col B, then are the cells
beneath it blank until the next instance of a part number? I am going
to assume this is the case. You fill the blank rows inbetween part
numbers with the correct part number by;

Highlight Column B
Edit – Goto –Special
Choose Blanks, then OK.

Now all the blank cells in the column are highlighted. Press ‘=’ hold
the Control key and press ENTER.

This will ensure your part numbers are in the corresponding row to
your serial numbers. You can then manipulate the serial numbers as
the part number will be in the corresponding column.

Hope this helps.

Marcus
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default grouping rows

Thanks for the reply. I'm using excel 2007 and when I highlight column B and
select go to blank it only picks one cell. Also when I highlight the blank
cells under a part number and press the Alt-enter-= together nothing happens.
Is there a setting that I need to change or am I doing something wrong.

"marcus" wrote:

If the part number appears only once in col B, then are the cells
beneath it blank until the next instance of a part number? I am going
to assume this is the case. You fill the blank rows inbetween part
numbers with the correct part number by;

Highlight Column B
Edit €“ Goto €“Special
Choose Blanks, then OK.

Now all the blank cells in the column are highlighted. Press €˜= hold
the Control key and press ENTER.

This will ensure your part numbers are in the corresponding row to
your serial numbers. You can then manipulate the serial numbers as
the part number will be in the corresponding column.

Hope this helps.

Marcus

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default grouping rows

Thank you for the macro. It wasn't what I thought I was looking for. I was
looking for a way to group the part number with the serial numbers so that
when I sorted our part numbers the serial number would stay with the part
number. I thought grouping would do this but it appears I was mistaken on
that.

"Roger Govier" wrote:

Hi

If I understand your request correctly, then the following macro should
achieve what you want

Sub FillParts()
Dim lr As Long, i As Long
lr = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To lr
If Cells(i, 2) = "" Then
Cells(i, 2) = Cells(i, 1)
Cells(i, 1) = Cells(i - 1, 1)
End If
Next i
End Sub

Copy code above
Alt+F11 to invoke VB Editor
InsertModule
Paste code into white pane that appears
Alt+F11 to rturn to Excel

To use
Alt+F8
Select macro FillPartsRun

--
Regards
Roger Govier

"bduncan" wrote in message
...
I export our inventory report into excel. In column A we have out serial
numbers and column B is our part numbers and column C is our quantity.
The
part number is only listed once in column B then in the rows below the
part
number in column A is the serial numbers for the part. Is there a vb
program
that could automatically highlight the serial numbers for a part number
and
group them together so that I can then manipulate my sheet with out
loosing
the serial numbers that go along with the part numbers?


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
Grouping Rows Seftyby Excel Worksheet Functions 1 October 3rd 08 02:18 PM
grouping rows AFE Excel Discussion (Misc queries) 1 February 13th 08 12:19 AM
grouping rows greg Excel Programming 2 January 25th 07 05:21 PM
Grouping Rows Moz Excel Discussion (Misc queries) 0 July 21st 06 05:33 AM
Grouping rows together Steve-o Excel Worksheet Functions 1 March 23rd 06 06:56 PM


All times are GMT +1. The time now is 10:23 PM.

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"