Move data from one sheet to another with argu
Closed
steve
-
Oct 21, 2010 at 08:00 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 22, 2010 at 01:36 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 22, 2010 at 01:36 AM
Related:
- Move data from one sheet to another with argu
- Transfer data from one excel worksheet to another automatically - Guide
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
- Tmobile data check - Guide
- Mark sheet in excel - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 22, 2010 at 01:36 AM
Oct 22, 2010 at 01:36 AM
quote
D4
1 premergent
2 starter fertilizer
1 winterizer
unquote
you did not make clear whether these three texts should be in one celll D4 or they can be in D4,D5 and D^ (I presumed latter)
the row no. 1 for headings.
PREFERBALY ALWAYS HAVE FIRST ROW AS COLUMN HEDINGS.
use this macro and see sheet 2.
D4
1 premergent
2 starter fertilizer
1 winterizer
unquote
you did not make clear whether these three texts should be in one celll D4 or they can be in D4,D5 and D^ (I presumed latter)
the row no. 1 for headings.
PREFERBALY ALWAYS HAVE FIRST ROW AS COLUMN HEDINGS.
use this macro and see sheet 2.
Sub test() Dim r As Range, c As Range, r1 As Range Dim j As Integer, x As String, ssum As Double j = 0 ssum = 0 Worksheets("sheet1").Activate Set r = Range(Range("c2"), Range("c2").End(xlDown)) For Each c In r If c = 0 Then GoTo nextc x = c & " " & Cells(c.Row, "A") ssum = ssum + Cells(c.Row, "f") 'msgbox x With Worksheets("sheet2") Set r1 = .Range("D4") r1.Offset(j, 0) = x End With j = j + 1 nextc: Next c 'msgbox ssum Worksheets("sheet2").Range("G7") = ssum End Sub