Good evening guys,
I have some problem completing a code. Here are the codes that works and won’t need tweaking:
This following Sub Test is the matching code that works kind of like a find:
Worksheet:
This code finds the matching range in my “Report” sheet, Column A and makes sure that the page I want to send it to finds that match:
This works like a copy and paste so what was in my D column in this sheet, it will match column A in my report and send it to column K in my “Report” sheet.
Same as above but from C to V
This copies Cell A and B from the active cell and sends it to my “MERX” sheet
Now this said I have some more code to add to it and got no freaking clue where to start. I have redone this code to my liking in a CommandButton1_Click() Macro
1 - From my Sheet MERX grab info from D send it to match the info in Report Sheet vs Column K
2 - From my Sheet MERX grab info from D send it to match the info in Report Sheet vs Column V
3 – Copy In my Sheet “Report” The Active Cell and Copy Cell A and B and Send it to my Sheet MERX but ask, by a form already build with a combobox, selection A B C D, once selection is made, to add “/” and the selection to the Active Cell A only.
4 – Go in my Report sheet and Offset that active row to insert a new row with the new information that the Active Row in my MERX sheet has but only change cell A with the “/” and combobox selection.
5 – Take the old Active Row on the “Report” sheet and send it to my “Archived” sheet on the next available row.
6 – Clear the old Active Row on the “Report” sheet.
Is this even possible?
Mind Blowing, I know I’ve been working on it for 2 days... Tylenols are my best friend right now.
I have some problem completing a code. Here are the codes that works and won’t need tweaking:
This following Sub Test is the matching code that works kind of like a find:
Code:
Sub Test()
MsgBox Application.WorksheetFunction.Match(Range("A5:A30"), Worksheets("Report").Range("A5:A10000"))
MsgBox Application.WorksheetFunction.Match(Range("A5:A30"), Worksheets("Archives").Range("A1:A10000"))
End Sub
Worksheet:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim C As Range, cc As Range
Dim ma As Range
Dim RptProjRowNum As Long
This code finds the matching range in my “Report” sheet, Column A and makes sure that the page I want to send it to finds that match:
Code:
RptProjRowNum = Application.WorksheetFunction.Match( _
ActiveSheet.Range("A" & ActiveCell.row).Value, _
Worksheets("Report").Range("A5:A10000"), 0) + 4
This works like a copy and paste so what was in my D column in this sheet, it will match column A in my report and send it to column K in my “Report” sheet.
Code:
Worksheets("Report").Range("K" & RptProjRowNum).Value = _
Range("D" & ActiveCell.Row).Value
Same as above but from C to V
Code:
Worksheets("Report").Range("V" & RptProjRowNum).Value = _
Range("C" & ActiveCell.Row).Value
This copies Cell A and B from the active cell and sends it to my “MERX” sheet
Code:
Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 2)).Copy
Sheets("MERX").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Now this said I have some more code to add to it and got no freaking clue where to start. I have redone this code to my liking in a CommandButton1_Click() Macro
1 - From my Sheet MERX grab info from D send it to match the info in Report Sheet vs Column K
2 - From my Sheet MERX grab info from D send it to match the info in Report Sheet vs Column V
3 – Copy In my Sheet “Report” The Active Cell and Copy Cell A and B and Send it to my Sheet MERX but ask, by a form already build with a combobox, selection A B C D, once selection is made, to add “/” and the selection to the Active Cell A only.
4 – Go in my Report sheet and Offset that active row to insert a new row with the new information that the Active Row in my MERX sheet has but only change cell A with the “/” and combobox selection.
5 – Take the old Active Row on the “Report” sheet and send it to my “Archived” sheet on the next available row.
6 – Clear the old Active Row on the “Report” sheet.
Is this even possible?
Mind Blowing, I know I’ve been working on it for 2 days... Tylenols are my best friend right now.