create new sheet based on date and paste rows from other sheet with x in column A.

silverback24

Board Regular
Joined
Jul 30, 2013
Messages
58
I am trying to write a macro that once the warehouse guy is done for the day can create a new sheet titled 'the current date' totals, then export all rows that have x in column A from a sheet called 'the current date' to this new sheet.

I have the template done for him and a macro that creates the sheet w/ title based on current date and all the formulas contained within, but having a brain block as to how to finish this.

Thanks for your help in advance.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Update, the main problem I'm having is naming the new sheet with a date and Total. The rest of it I can do with record or paste a code to get to work but the naming this throwing me.
 
Upvote 0
I'm not seeing a way to edit my posts, so here is another update.
My issue now is how do I get this macro to take the rows from the current days sheet and paste them into the current day total sheet? I see formulas for doing it from static sheets but these will change every day.

Here's the macro I'm working with currently:

Sub PICKERTOTALS()
'
' PICKERTOTALS Macro
'
' Keyboard Shortcut: Ctrl+w
'
Dim NumberSheets As Integer
NumberSheets = ActiveWorkbook.Worksheets.Count
Sheets.Add After:=Sheets(NumberSheets)
ActiveSheet.Name = Sheet1.[c2].Value
Sheet1.Activate
'can I combine these two macros like this?

'the data is in a sheet with name like "23 Aug 13" that needs to change daily
Sheets("Sheet1").Select
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
For i = 1 To RowCount
'the x statment is in column a
Range("a" & i).Select
check_value = ActiveCell
If check_value = "X" Or check_value = "x" Then
ActiveCell.EntireRow.Copy
'the data is in a sheet with name like "23 8 2013 Total"(I get name from sheet1 C2) that needs to change daily
Sheets("Sheet2").Select
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
Range("a" & RowCount + 1).Select
ActiveSheet.Paste
Sheets("Sheet1").Select
End If
Next
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top