Thread: Programing help
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
jaysphotos jaysphotos is offline
external usenet poster
 
Posts: 7
Default Programing help

This worked for one cell and maybe I did not think this through. C10 & C11
are just the first 2 cells in the colum that needs to move. I have C10:C27
that needs to move to the commision sheet in B3, just like you thought below,
if 0. I would also like D10:D27 to move to starting in C3. Maybe I'm
dreaming but I would like a total(which I could hide that colum) starting
with p10:p27 and move it to colum g3 on the commision sheet.

Thank you for your help!

"Rowan Drummond" wrote:

I'm guessing you want to move the data to the commissions sheet starting
at cell B3 and then B4, B5 etc. If so try:

Sub GetData()
Dim comSht As Worksheet
Dim sht As Worksheet
Dim r As Long

r = 3
Set comSht = Sheets("Comms") '<<change to name of commissions sheet
For Each sht In ThisWorkbook.Worksheets
If sht.Name < comSht.Name Then
If Application.WorksheetFunction. _
CountA(sht.Range("F10:O11")) 0 Then
comSht.Cells(r, 2).Value = sht.Range("C10").Value _
& " " & sht.Range("C11").Value
r = r + 1
End If
End If
Next sht
End Sub

Hope this helps
Rowan


jaysphotos wrote:
I have a workbook that has 32 sheets in it 31 of the sheets are the same and
the last one is used to track commisions on and do a mail merge to send out
thank you cards. On the sheets labeled 1-31 if cells f 10 - o 11 have
anything other than blank I want cells c 10 & 11(these cells have text in
them) moved to the commision tracking sheet into cell b3 and it will need to
concatenate c 10 & 11. I'am very new to programing. Thank you for your help!