Related:
- To compare and return the string value
- Beyond compare - Download - File management
- Thunderbird return receipt - Guide
- How to merge and compare two excel files - Guide
- Vba select case string - Guide
- Excel count occurrences of string - Guide
6 responses
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
24 Aug 2009 à 21:20
24 Aug 2009 à 21:20
quote
eturn the value "Apple A 1245" into a cell......"
unquote
in which cell?
eturn the value "Apple A 1245" into a cell......"
unquote
in which cell?
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
25 Aug 2009 à 05:27
25 Aug 2009 à 05:27
still I am confused . pl gives the first few rows of sheet 2
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
26 Aug 2009 à 21:54
26 Aug 2009 à 21:54
still nto clear
I am rephrasing it
fruit names are there in A2 down in column A in sheet 1
if the length of the furit name is 12 OR 15 that row in sheet should be copied
to the first blank row in sheet 2.
(what happens if it is 1 to 11,13 ,14,16 and above nothing is to be done )
if this is ok
try this macro
I am rephrasing it
fruit names are there in A2 down in column A in sheet 1
if the length of the furit name is 12 OR 15 that row in sheet should be copied
to the first blank row in sheet 2.
(what happens if it is 1 to 11,13 ,14,16 and above nothing is to be done )
if this is ok
try this macro
Sub test()
Dim rng As Range, c As Range
With Worksheets("sheet1")
Set rng = Range(.Range("a2"), .Range("A2").End(xlDown))
For Each c In rng
If Len(c) = 12 Or Len(c) = 15 Then
c.EntireRow.Copy
End If
With Worksheets("sheet2")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
Next c
End With
End Sub
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
27 Aug 2009 à 05:39
27 Aug 2009 à 05:39
if you have only lenghts of 12 and 15 why not just copy the whole sheet.
of do you want elngth 12 in one sheet (sheet 2) and 15 in another sheet sheet 3.
of do you want elngth 12 in one sheet (sheet 2) and 15 in another sheet sheet 3.
venkat1926
Posts
1863
Registration date
Sunday 14 June 2009
Status
Contributor
Last seen
7 August 2021
811
27 Aug 2009 à 20:53
27 Aug 2009 à 20:53
it is not that simple. the macro is modified. the modifie macro is given below
Sub tes1()
Dim rng As Range, c As Range
With Worksheets("sheet1")
Set rng = Range(.Range("A2"), .Range("A2").End(xlDown))
For Each c In rng
If Len(c) = 12 Then
c.EntireRow.Copy
With Worksheets("sheet2")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
ElseIf Len(c) = 15 Then
c.EntireRow.Copy
With Worksheets("sheet3")
.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial
End With
End If
Next c
End With
End Sub
24 Aug 2009 à 22:18
thanks