Thread
:
Adding Cell Value to another Sheet if...
View Single Post
#
5
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Adding Cell Value to another Sheet if...
http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Don Guillett
SalesAid Software
"Mike Pearson" wrote in message
...
This looks like a great way to do it, I am just a little new at writing
macros. Would you mind please being a little more descriptive so that I
can
figure out how to put this thing in. I really appreciate it.
"Don Guillett" wrote:
This should do it
Sub getmonthlydata()
For Each c In Range("e2:e" & Cells(Rows.Count, "e").End(xlUp).Row)
If Month(c) = Month(Date) Then
'MsgBox c.Address
ms = ms & ", " & c.Offset(, -1)
End If
Next c
'MsgBox Right(ms, Len(ms) - 1)
Sheets("sheet2").Range("d7") = Right(ms, Len(ms) - 1)
End Sub
--
Don Guillett
SalesAid Software
"Mike Pearson" <Mike
wrote in message
...
On Sheet1 I have a column of account names and a column of dates of
last
vist
ie:
abc company 6/1/2007
xwz corp 4/15/2007
exl inc. 2/12/2007
aaa corp 6/5/2007
bbb inc. 6/11/2007
What I want to do is if the date of last visit is equal to
month(today())
then I want it to list all of those accounts seperated by a comma on
sheet2.
ie:
abc company, aaa corp, bbb inc.
Is that possible, if so how?
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett