DimebagCFH
New Member
- Joined
- May 7, 2017
- Messages
- 2
Dear all,
First of all, I'd like to introduce myself because I've just discovered this interesting forum that probably would help me a lot to learn about Macros!
I'm DimebagCFH and I work in a Quality Dept in automotive sector (Spain). So please, excuse my poor english level.
I'm not used to macros because I started this week to learn Excel macros and despite I know something from other language codes I don't know nothing from VB, but I can read and understand it the most.
I'd like to ask something that is getting on my nerves since yesterday, and I've been looking for it in loads of websites since I found these topic from this forum:
https://www.mrexcel.com/forum/excel-questions/27801-activecell-range.html
My question is this:
I need to write a simple macro that should select and copy some cells of the same row but different colum, and the columns are already known:
i.e:
Select the ("B5,B10,B15,B20"), etc. Not the ("B5:B20").
But maybe with just a brief example I'm able to continue by myself.
What I tryed is something like this:
Dim MyRange As Range
Set MyRange = Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells(ActiveCell.Row, ActiveCell.Column + 2))
MyRange.Select
But what excel finnaly does is select from the active cell to the activecell+ 2 colums, all together.
Can anyone help me with this?
Many thanks in advance!
First of all, I'd like to introduce myself because I've just discovered this interesting forum that probably would help me a lot to learn about Macros!
I'm DimebagCFH and I work in a Quality Dept in automotive sector (Spain). So please, excuse my poor english level.
I'm not used to macros because I started this week to learn Excel macros and despite I know something from other language codes I don't know nothing from VB, but I can read and understand it the most.
I'd like to ask something that is getting on my nerves since yesterday, and I've been looking for it in loads of websites since I found these topic from this forum:
https://www.mrexcel.com/forum/excel-questions/27801-activecell-range.html
My question is this:
I need to write a simple macro that should select and copy some cells of the same row but different colum, and the columns are already known:
- Select the actual cell.
- Select the cell in +15 columns position.
- Select the cell in +30 columns position.
- Select the cell in +45 columns position.
i.e:
Select the ("B5,B10,B15,B20"), etc. Not the ("B5:B20").
But maybe with just a brief example I'm able to continue by myself.
What I tryed is something like this:
Dim MyRange As Range
Set MyRange = Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells(ActiveCell.Row, ActiveCell.Column + 2))
MyRange.Select
But what excel finnaly does is select from the active cell to the activecell+ 2 colums, all together.
Can anyone help me with this?
Many thanks in advance!