PC Review


Reply
 
 
Mauro
Guest
Posts: n/a
 
      3rd May 2010
Hello everybody, I have a problem:
In my Sheet1 I have column A, D, G, J, M, P, S and V with values I need to
copy to Sheet2. The values are only the ones that in the second column to
the right have an * (so for A - C and so on).
There is a format I must follow (val=value): CellA headervalOZ/valOZ.T and
so on. I.E. PMC12345OZ/23457OZ.T2 (T=nr of values on that line). The max
amount of values per line is 5. If there are more than 5 value in a column
then a new alinea must be started. If there are less values then the values
in the new line must begin in a new row. I am not sure that what I wrote
makes any sense to you... but I surely hope so (it is all oh so clear in my
mind... lol)

thanks in advance for any help


 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      3rd May 2010
I sent OP file using this.

Sub SAS_DoTelexSheet()
Application.ScreenUpdating = False
Sheets("telex").Columns(1).ClearContents
SAS_SortSCM_AllColumns'called to sort
With Sheets("SCM")
On Error Resume Next 'if no entries
For i = 1 To .Cells(1, .Columns.Count).End(xlToLeft).Column Step 3
clr = .Cells(.Rows.Count, i + 2).End(xlUp).Row
'MsgBox clr
r = 2
dlr = Sheets("Telex").Cells(Rows.Count, 1).End(xlUp).Row + 1
For j = 1 To Int(clr / 5) + 1 'MsgBox j
ms = ""
'MsgBox j
tc = 0
For k = 0 To 4
If .Cells(r + k, i + 2) = "*" Then
ms = ms & .Cells(r + k + 0, i) & "OZ/"
tc = tc + 1
End If
Next k
r = r + 5
'MsgBox tc
'MsgBox "." & Cells(1, i) & " " & Left(ms, Len(ms) - 1)
Sheets("Telex").Cells(dlr, 1) = "." & .Cells(1, i) & " " & Left(ms,
Len(ms) - 1) & ".T" & tc
Sheets("Telex").Cells(1, 1) = "Telex"
dlr = dlr + 1
Next j
Next i
End With
Application.ScreenUpdating = True
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Mauro" <(E-Mail Removed)> wrote in message
news:MfvDn.170231$(E-Mail Removed)...
> Hello everybody, I have a problem:
> In my Sheet1 I have column A, D, G, J, M, P, S and V with values I need to
> copy to Sheet2. The values are only the ones that in the second column to
> the right have an * (so for A - C and so on).
> There is a format I must follow (val=value): CellA headervalOZ/valOZ.T and
> so on. I.E. PMC12345OZ/23457OZ.T2 (T=nr of values on that line). The max
> amount of values per line is 5. If there are more than 5 value in a column
> then a new alinea must be started. If there are less values then the
> values
> in the new line must begin in a new row. I am not sure that what I wrote
> makes any sense to you... but I surely hope so (it is all oh so clear in
> my
> mind... lol)
>
> thanks in advance for any help
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Range and Assign a Defined Name to the Pasted Range sgltaylor Microsoft Excel Programming 3 5th Dec 2009 12:47 PM
Copy range from Sheet1 into empty range in Sheet2 Buddy Microsoft Excel Programming 1 19th Aug 2009 12:07 AM
RANGE EXCEL copy cell that meets criteria in a range confused Microsoft Excel Worksheet Functions 3 27th Mar 2008 01:41 PM
How do I edit a selected range then copy the range into an new sheet??? dwyborn Microsoft Excel Programming 2 16th Dec 2005 04:11 PM
Create/copy combo boxes in one range if condition is met in a different range LB Microsoft Excel Programming 4 30th Sep 2005 12:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 AM.