ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search Cells (https://www.excelbanter.com/excel-programming/333189-search-cells.html)

kwedde01[_3_]

Search Cells
 

I am trying to write a VBA code that when executed will search tw
columns within my worksheet, the first is the date column and th
second a column for smokers. When the code is run I would like it t
ask the user which date he would like to search for, once selected th
program will look for all cells with the specific date and the
evaluate if the corresponding rows in Smokers have a number 1 in them
if they do it will count the one and so until all rows that satisy th
specified date in the date column and the number 1 in the Smoker
column.

Once the count is completed it the macro will insert a table whic
will have heading date and number of smokers, and will then put th
date and count delow each of these headings.

Is it also possible to have the code just run a complete scan on th
worksheet and just find all matching dates and their correspondin
smoker info, find the count and then add them to a table with te
headings Date and # of Smoker

--
kwedde0
-----------------------------------------------------------------------
kwedde01's Profile: http://www.excelforum.com/member.php...fo&userid=2415
View this thread: http://www.excelforum.com/showthread.php?threadid=38322



All times are GMT +1. The time now is 01:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com