Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Search and Copy within Excel using VBA

I am using Excel as a Contact Database. The various columns include Name,
Address, Phone, etc. The column of interest for this post is the "Birthday"
Column

I would like to set up a pushbutton that searches through the "Birthday"
column, finds birthdays that are within the current month, and then places
those names and birthdays in 2 side-by-side columns. I would also like to
create one for the "next" month.

I have been using the "Month" and "Find" commands combined with a For loop.
I am having trouble figuring out how to place the Name and Birthday into a
cell, and then place the next Name and next Birthday into another cell.

I am familiar with programming, just not Visual Basic. I could use some
help. This seems like an easy thing to do.

Thanks in advance!!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default Search and Copy within Excel using VBA

Try something like

For i = 1 to 500
if Month(Cell(i,2)) = Month(Date) then

' code
ElseIf Month(Cell(i,2)) = Month(Date) + 1
'code
End If
next
--
steveB

Remove "AYN" from email to respond
"sapper44" wrote in message
...
I am using Excel as a Contact Database. The various columns include Name,
Address, Phone, etc. The column of interest for this post is the
"Birthday"
Column

I would like to set up a pushbutton that searches through the "Birthday"
column, finds birthdays that are within the current month, and then places
those names and birthdays in 2 side-by-side columns. I would also like to
create one for the "next" month.

I have been using the "Month" and "Find" commands combined with a For
loop.
I am having trouble figuring out how to place the Name and Birthday into a
cell, and then place the next Name and next Birthday into another cell.

I am familiar with programming, just not Visual Basic. I could use some
help. This seems like an easy thing to do.

Thanks in advance!!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and copy Sj Excel Discussion (Misc queries) 2 August 6th 09 04:18 PM
How to search column, copy row, and copy to another sheet in same Rockhound Excel Discussion (Misc queries) 1 December 9th 06 04:16 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Search and copy Hru48 Excel Discussion (Misc queries) 1 October 31st 05 03:56 PM
Excel Copy/Search/Paste Help Needed ASAP! NWill Excel Programming 2 September 23rd 04 05:06 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"