LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Grouping values

Thank you so much! It works just as I wanted...

Have a nice day.
Barbara

PS:I love these Discussion Groups... They are so helpfull.

"Norman Jones" wrote:

Hi Barbara,

'----------------
Now..... Is there a way to change this:
Else
Espessura = 0

with this:
Else
Espessura = "Others"


I tryed but as it is text, it gives me an error!
'----------------

Try declaring Espessura as variant:

'=============
Public Sub Espessuras()
Dim Esp As Double 'Thickness article
Dim Espessura As Variant 'Regroup thickness
Dim linhaf As Long
Dim linha As Long
linhaf = Range("A1").End(xlDown).Row

For linha = 2 To linhaf
Esp = Range("P" & linha).Value
If Esp = "0.03" Then
Espessura = "0.03"
ElseIf Esp = "0.02" Then
Espessura = "0.02"
ElseIf Esp = "0.01" Then
Espessura = "0.01"
Else
Espessura = "Other"
End If
Range("Q" & linha).Value = Espessura
Next linha
End Sub
'<<=============


---
Regards,
Norman





 
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
Formula help...find values and grouping together... Jambruins Excel Discussion (Misc queries) 3 November 13th 07 03:33 PM
Grouping Corresponding Values Mark Hughes Excel Discussion (Misc queries) 3 May 1st 07 04:59 PM
Grouping Cell Values Together steve65 Excel Discussion (Misc queries) 6 August 16th 06 01:42 AM
Help with grouping values Scott M.[_2_] Excel Programming 1 August 30th 04 03:41 PM
Code for Grouping Text Values in Pivotfield Keith Young Excel Programming 1 July 17th 03 03:14 AM


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