Hi all!
I want to create a macro that will find a certain column, based on the value of a cell in that column, and copy/paste values the data from that column to another sheet.
The reason why i need it to find based on a value of a cell is because i have "customizable"/"moving" columns and they may not be universal for all managers or could change, and i want to minimize the risk of error.
I keep the values in a specific row (row4).
Would anyone have any idea on how to create something like this? Thank you for any guidance!
Heres a piece of an example of what I have for another parts of this that aren't as complicated as what I'm looking for (this is in a module of the workbook using a button/shape to run). Basically I'm wondering how do i find the Range(?) because the Range might not be specifically column E (or any other letter) (I apologize I'm self teaching and I'm almost at the home stretch of this!)
Sub Example()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("Sheet1").Select
Range("E7:E1000").Select
Selection.Copy
Range("AA7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("E7").Select
Sheets("Sheet1").Visible = xlHidden
End Sub
I want to create a macro that will find a certain column, based on the value of a cell in that column, and copy/paste values the data from that column to another sheet.
The reason why i need it to find based on a value of a cell is because i have "customizable"/"moving" columns and they may not be universal for all managers or could change, and i want to minimize the risk of error.
I keep the values in a specific row (row4).
Would anyone have any idea on how to create something like this? Thank you for any guidance!
Heres a piece of an example of what I have for another parts of this that aren't as complicated as what I'm looking for (this is in a module of the workbook using a button/shape to run). Basically I'm wondering how do i find the Range(?) because the Range might not be specifically column E (or any other letter) (I apologize I'm self teaching and I'm almost at the home stretch of this!)
Sub Example()
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Visible = xlSheetVisible
Next ws
Sheets("Sheet1").Select
Range("E7:E1000").Select
Selection.Copy
Range("AA7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("E7").Select
Sheets("Sheet1").Visible = xlHidden
End Sub