gabriellejayde
New Member
- Joined
- Apr 18, 2022
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
I recently asked for help with a macro and thanks to some of you- I got it to work. I need a little more help and then i've basically solved the biggest problem our warehouse has.
For the record, I'm a graphic designer and know almost nothing about VBA.
Here's what I'm trying to do:
We have contents one tab of a worksheet. We need to copy all of the new content and then paste it into an access database. The problem is, some of the contents being copied is a formula, and I was told that we can't easily paste values into a database.
So there's a button at the top with a macro that will copy the contents only (not the thousands of blank lines after the content), then paste the values into "sheet 2".
I would like that same button to then CUT all of the contents on sheet 2 (but just the filled in data - not any blank lines). The amount of rows will change all the time. Then our warehouse technician can just open the access database and hit paste.
I've gotten the macro to copy all of the contents (just the filled rows) from the first sheet, then paste the values into sheet 2. How do I then get it to cut the content of the filled rows from sheet 2?
Here's what I have:
Sub CopyInventory()
'
' CopyInventory Macro
' FROM INVENTORY MANAGER
'
Dim r As Long
Range("G1").Select
Selection.End(xlDown).Select
r = ActiveCell.Row
LR = Evaluate("MAX((G33:O5000<>"""")*ROW(G33:O5000))")
Range("F33:O" & LR).Copy
Sheets("Sheet2").Range("B1").PasteSpecial Paste:=xlPasteValues.
End Sub
Thank you all SO MUCH!!
For the record, I'm a graphic designer and know almost nothing about VBA.
Here's what I'm trying to do:
We have contents one tab of a worksheet. We need to copy all of the new content and then paste it into an access database. The problem is, some of the contents being copied is a formula, and I was told that we can't easily paste values into a database.
So there's a button at the top with a macro that will copy the contents only (not the thousands of blank lines after the content), then paste the values into "sheet 2".
I would like that same button to then CUT all of the contents on sheet 2 (but just the filled in data - not any blank lines). The amount of rows will change all the time. Then our warehouse technician can just open the access database and hit paste.
I've gotten the macro to copy all of the contents (just the filled rows) from the first sheet, then paste the values into sheet 2. How do I then get it to cut the content of the filled rows from sheet 2?
Here's what I have:
Sub CopyInventory()
'
' CopyInventory Macro
' FROM INVENTORY MANAGER
'
Dim r As Long
Range("G1").Select
Selection.End(xlDown).Select
r = ActiveCell.Row
LR = Evaluate("MAX((G33:O5000<>"""")*ROW(G33:O5000))")
Range("F33:O" & LR).Copy
Sheets("Sheet2").Range("B1").PasteSpecial Paste:=xlPasteValues.
End Sub
Thank you all SO MUCH!!