Thread
:
macro's with if function included
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
macro's with if function included
If?? you want to copy col A data to the column indicated in a1 then just
reverse it to this
Columns(1).Copy Columns(mc)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Don Guillett" wrote in message
...
Right click sheet tabview codeinsert this. Be advised that it will copy
the whole column to col A.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$A$1" Then Exit Sub
mc = Rows(1).Find(What:=Target, After:=Cells(1, 1), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Column
Columns(mc).Copy Columns(1)
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Josh" <Josh @discussions.microsoft.com wrote in message
...
I am trying to write a macro that takes a set of data, pastes special the
data depending on what month the column displays with some sort of if
function. Is it possible to do this and how do i do it.
E.g.
Input:
Jan Jan Feb Mar
April
13 x
23 x
28 x
As above when the data is placed in Jan i would like it to paste special
the
data in the Jan column (displayed with X). However if the name aboe the
input data was changed to Feb i would like it to place the data in Feb.
Thanks in advance for anyone's help...
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett