The question is a little more difficult than the title, just don't know how to ask it.
I have a spread sheet that contains 4 columns (Part Number,Qty,Location and Description), is there a way using vba o some excel function that can copy and paste data depending on the selected cell the idea is this:
I have the 4 columns and I only need the Part Number,Qty and Description and paste it on a different sheet that has some formulas that need that data, but i need to make some type of input since there are many part number. I'm not sure if I'm explaining my self.
Note: I have never programmed in vba nor excel-vba and I'm not familiar with excel at all, just really basic stuff, this is what i came up with by reading some stuff
Private Sub CommandButton1_Click()
Worksheets("Sheet1").Range("A4:A65").Copy
Worksheets("Sheet2").Range("A4:A65").PasteSpecial
Worksheets("Sheet1").Range("D4:D65").Copy
Worksheets("Sheet2").Range("D4:D65").PasteSpecial
Worksheets("Sheet1").Range("F4:F65").Copy
Worksheets("Sheet2").Range("G4:G65").PasteSpecial
Worksheets("Sheet1").Range("A4:A65").ClearFormats
Worksheets("Sheet2").Range("A4:A65").ClearFormats
Worksheets("Sheet2").Range("A4:A65").Font.Size = 10
Worksheets("Sheet2").Range("D4:D65").Font.Size = 10
End Sub
this just copies and paste everything i just want specific cell-row the user selects If you can provide any help its useful since I'm trying to learn vba using excel.
-Off topic (how to i format my code in forum)
Edit 1 -
Dim myValue As Variant
Part = InputBox("Whitch Part", "Buscar")
With Worksheets("Sheet1").Range("A4:A65")
Cells.Find(What:=Part, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate