App.Wrksht_Match unfinished code help

Excelnoub

Board Regular
Joined
Nov 17, 2011
Messages
230
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:

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.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I guess I could play around with this and try to figure out the real code but here is a view of what I would need help, well one of the code...

Code:
    Range("A5:Z5").Select
    Selection.AutoFill Destination:=Range("A5:Z6"), Type:=xlFillCopy
    Range("A6").Select
    ActiveCell.FormulaR1C1 = "Test/A" 
    Range("A5:Z5").Select
    Selection.Cut
    Sheets("Archives").Select
    Rows("3:3").Select
    ActiveSheet.Paste
    Sheets("Report").Select
 
Upvote 0

Forum statistics

Threads
1,203,744
Messages
6,057,116
Members
444,905
Latest member
Iamtryingman

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