Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Row to column conversion

How can I get below info to show as:

A1 B1 C1
Item number 894011 Bag Poly w/snaps for 6x9 mats

Requirement date Month Calculated Opening Inv.
8/1/2008 August 0
9/1/2008 September -624
12/1/2008 December 2,076
1/1/2009 January 1,932
3/1/2009 March 1,452
================================================== ================================
Like this


Aug. Sept October Nov. Dec
Item number 894011 Bag Poly w/snaps for 6x9 mats 0
-624 #N/A #N/A 2076

Some months are in order some of them are not the way you see above.

thanks
Vedat

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Row to column conversion

It is hard to give you a good answer because I don't know for how many items
you need to perform this conversion for and if you are doing it to multiple
items the spacing and header rows for each item. There is one problem that
need to be fixed no matter which methoid you use. Your month names either
need to be spellout completely or use the standard 3 letter abrevation for
each month name in both the source table and where you want the results to go.

It would also help to give the sheet name(s) and the rows and columns where
the data is located.

" wrote:

How can I get below info to show as:

A1 B1 C1
Item number 894011 Bag Poly w/snaps for 6x9 mats

Requirement date Month Calculated Opening Inv.
8/1/2008 August 0
9/1/2008 September -624
12/1/2008 December 2,076
1/1/2009 January 1,932
3/1/2009 March 1,452
================================================== ================================
Like this


Aug. Sept October Nov. Dec
Item number 894011 Bag Poly w/snaps for 6x9 mats 0
-624 #N/A #N/A 2076

Some months are in order some of them are not the way you see above.

thanks
Vedat


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Row to column conversion

On Aug 31, 6:01*pm, Joel wrote:
It is hard to give you a good answer because I don't know for how many items
you need to perform this conversion for and if you are doing it to multiple
items the spacing and header rows for each item. *There is one problem that
need to be fixed no matter which methoid you use. *Your month names either
need to be spellout completely or use the standard 3 letter abrevation for
each month name in both the source table and where you want the results to go.

It would also help to give the sheet name(s) and the rows and columns where
the data is located.



" wrote:
How can I get below info to show as:


A1 * * * * * * * * * * * * * * * B1 * * * * *C1
Item number * * * *894011 *Bag Poly w/snaps for 6x9 mats


Requirement date * Month * Calculated Opening Inv.
8/1/2008 * * * * * * * * *August * * * * *0
9/1/2008 * * * * * * * * September * * -624
12/1/2008 * * * * * * * *December * * *2,076
1/1/2009 * * * * * * * * January * * * 1,932
3/1/2009 * * * * * * * * March * * * * 1,452
================================================== =========================*=======
Like this


Aug. * *Sept * * *October * * * *Nov. * *Dec
Item number * * * *894011 *Bag Poly w/snaps for 6x9 mats * * * * * * *0
-624 * * * * *#N/A * * * #N/A * 2076


Some months are in order some of them are not the way you see above.


thanks
Vedat- Hide quoted text -


- Show quoted text -


Thank you, I know my data was short or not clear.

My item numbers are 5 digits(B1747) that is why I put B1747100 and
formula.
I use this formula: =IF(B1747100,IF(B1758="August",I1758),""), if
August is not in the line, It does not work.

I have 6635 lines and trying to pull 485 items out of those 6635
lines. Spaces are specific.

Sheet name is 01 Inventory.

Do these info helps?
Vedat
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Row to column conversion

See if this code works. I tried to make the code handle every case I could
think of to prevent errors. This code is prety robust. The code creates a
summary sheet. if you run the code twice you must remove the summary sheet
manually.

Sub CreateSummary()
StartMonth = 8

Set SumSht = Sheets.Add(after:=Sheets(Sheets.Count))
SumSht.Name = "Summary"
'Create Header Row
For MonthNumber = 0 To 11
SumSht.Cells(1, MonthNumber + 4) = _
MonthName(((StartMonth + MonthNumber - 1) Mod 12) + 1)
Next MonthNumber

SumRowCount = 1
With Sheets("01 Inventory")
LastRow = .Range("A" & Rows.Count).End(xlUp).Row
For InventRowCount = 1 To LastRow
If .Range("A" & InventRowCount) = "Item number" Then
SumRowCount = SumRowCount + 1
.Range("A" & InventRowCount & _
":C" & InventRowCount).Copy _
Destination:=SumSht.Range("A" & SumRowCount)
End If
If IsDate(.Range("A" & InventRowCount)) Then
'find the correct column for the month name
NameofMonth = .Range("B" & InventRowCount)
Inventory = .Range("C" & InventRowCount)
With SumSht
Set c = .Rows(1).Find(what:=NameofMonth, _
LookIn:=xlValues, lookat:=xlWhole)
If c Is Nothing Then
MsgBox ("Cannot find Month : " & NameofMonth)
Else
.Cells(SumRowCount, c.Column) = Inventory
End If
End With
End If
Next InventRowCount
End With
End Sub


" wrote:

On Aug 31, 6:01 pm, Joel wrote:
It is hard to give you a good answer because I don't know for how many items
you need to perform this conversion for and if you are doing it to multiple
items the spacing and header rows for each item. There is one problem that
need to be fixed no matter which methoid you use. Your month names either
need to be spellout completely or use the standard 3 letter abrevation for
each month name in both the source table and where you want the results to go.

It would also help to give the sheet name(s) and the rows and columns where
the data is located.



" wrote:
How can I get below info to show as:


A1 B1 C1
Item number 894011 Bag Poly w/snaps for 6x9 mats


Requirement date Month Calculated Opening Inv.
8/1/2008 August 0
9/1/2008 September -624
12/1/2008 December 2,076
1/1/2009 January 1,932
3/1/2009 March 1,452
================================================== =========================Â*=======
Like this


Aug. Sept October Nov. Dec
Item number 894011 Bag Poly w/snaps for 6x9 mats 0
-624 #N/A #N/A 2076


Some months are in order some of them are not the way you see above.


thanks
Vedat- Hide quoted text -


- Show quoted text -


Thank you, I know my data was short or not clear.

My item numbers are 5 digits(B1747) that is why I put B1747100 and
formula.
I use this formula: =IF(B1747100,IF(B1758="August",I1758),""), if
August is not in the line, It does not work.

I have 6635 lines and trying to pull 485 items out of those 6635
lines. Spaces are specific.

Sheet name is 01 Inventory.

Do these info helps?
Vedat

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Row to column conversion

On Sep 1, 12:23*am, Joel wrote:
See if this code works. *I tried to make the code handle every case I could
think of to prevent errors. *This code is prety robust. *The code creates a
summary sheet. *if you run the code twice you must remove the summary sheet
manually.

Sub CreateSummary()
StartMonth = 8

Set SumSht = Sheets.Add(after:=Sheets(Sheets.Count))
SumSht.Name = "Summary"
'Create Header Row
For MonthNumber = 0 To 11
* *SumSht.Cells(1, MonthNumber + 4) = _
* * * MonthName(((StartMonth + MonthNumber - 1) Mod 12) + 1)
Next MonthNumber

SumRowCount = 1
With Sheets("01 Inventory")
* *LastRow = .Range("A" & Rows.Count).End(xlUp).Row
* *For InventRowCount = 1 To LastRow
* * * If .Range("A" & InventRowCount) = "Item number" Then
* * * * *SumRowCount = SumRowCount + 1
* * * * *.Range("A" & InventRowCount & _
* * * * * * ":C" & InventRowCount).Copy _
* * * * * * Destination:=SumSht.Range("A" & SumRowCount)
* * * End If
* * * If IsDate(.Range("A" & InventRowCount)) Then
* * * * 'find the correct column for the month name
* * * * NameofMonth = .Range("B" & InventRowCount)
* * * * Inventory = .Range("C" & InventRowCount)
* * * * With SumSht
* * * * * *Set c = .Rows(1).Find(what:=NameofMonth, _
* * * * * * * LookIn:=xlValues, lookat:=xlWhole)
* * * * * *If c Is Nothing Then
* * * * * * * MsgBox ("Cannot find Month : " & NameofMonth)
* * * * * *Else
* * * * * * * .Cells(SumRowCount, c.Column) = Inventory
* * * * * *End If
* * * * End With
* * * End If
* *Next InventRowCount
End With
End Sub



" wrote:
On Aug 31, 6:01 pm, Joel wrote:
It is hard to give you a good answer because I don't know for how many items
you need to perform this conversion for and if you are doing it to multiple
items the spacing and header rows for each item. *There is one problem that
need to be fixed no matter which methoid you use. *Your month names either
need to be spellout completely or use the standard 3 letter abrevation for
each month name in both the source table and where you want the results to go.


It would also help to give the sheet name(s) and the rows and columns where
the data is located.


" wrote:
How can I get below info to show as:


A1 * * * * * * * * * * * * * * * B1 * * * * *C1
Item number * * * *894011 *Bag Poly w/snaps for 6x9 mats


Requirement date * Month * Calculated Opening Inv.
8/1/2008 * * * * * * * * *August * * * * *0
9/1/2008 * * * * * * * * September * * -624
12/1/2008 * * * * * * * *December * * *2,076
1/1/2009 * * * * * * * * January * * * 1,932
3/1/2009 * * * * * * * * March * * * * 1,452
================================================== =========================**=======
Like this


Aug. * *Sept * * *October * * * *Nov. * *Dec
Item number * * * *894011 *Bag Poly w/snaps for 6x9 mats * * * * * * *0
-624 * * * * *#N/A * * * #N/A * 2076


Some months are in order some of them are not the way you see above..


thanks
Vedat- Hide quoted text -


- Show quoted text -


Thank you, I know my data was short or not clear.


*My item numbers are 5 digits(B1747) that is why I put B1747100 and
formula.
I use this formula: =IF(B1747100,IF(B1758="August",I1758),""), if
August is not in the line, It does not work.


I have 6635 lines and trying to pull 485 items out of those 6635
lines. Spaces are specific.


Sheet name is 01 Inventory.


Do these info helps?
Vedat- Hide quoted text -


- Show quoted text -


Thank you very much, It worked.


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
Conversion Suleman[_2_] Excel Worksheet Functions 1 April 27th 08 08:51 PM
Conversion [email protected] Excel Discussion (Misc queries) 0 August 6th 06 10:15 PM
Perpelexing Row to Column conversion Geno Excel Discussion (Misc queries) 3 July 7th 06 04:04 PM
Excel Column and row conversion MSM Excel Discussion (Misc queries) 1 May 7th 05 03:12 PM
Between conversion Dan Wilson Excel Worksheet Functions 0 March 13th 05 03:02 PM


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

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

About Us

"It's about Microsoft Excel"