Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm looking for a look-up solution for a worksheet. My worksheet column 68 contains dates. I need to figure out how t code the following scenario: The end user enters a date into an input box: dtReportDate = (Date:=strReportDate). I want to display ALL matching dates in another worksheet("To Do List" to create a report. Im assuming I will need some kind of a Loo Statement or For Each statement. Can anyone help me out? Thanks -- Mcastee ----------------------------------------------------------------------- Mcasteel's Profile: http://www.excelforum.com/member.php...fo&userid=1569 View this thread: http://www.excelforum.com/showthread.php?threadid=27714 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe some ideas (untested and may contain typos!):
dim dtReportDate as date dim myCell as range dim myRng as range dim oRow as long ''' if isdate(strreportdate) then dtreportdate =cdate(strReportdate) else msgbox "not a date" exit sub end if ''' with worksheets("sheet1withdates") set myrng = .range(.cells(1,68),.cells(.rows.count,68).end(xlu p)) end with orow = 0 for each mycell in myrng.cells if mycell.value = dtreportdate then orow = orow + 1 with worksheets("to do list").cells(orow,"A") .value = mycell.value .offset(0,1).value = mycell.offset(0,3).value 'whatever??? end with next mycell Just a note about your previous posts compared to this one. When the question is narrow, you have a much better chance of getting a response. Isolating just one little portion is a lot less intimidating for most responders (well, at least for me!). Mcasteel wrote: I'm looking for a look-up solution for a worksheet. My worksheet column 68 contains dates. I need to figure out how to code the following scenario: The end user enters a date into an input box: dtReportDate = (Date:=strReportDate). I want to display ALL matching dates in another worksheet("To Do List") to create a report. Im assuming I will need some kind of a Loop Statement or For Each statement. Can anyone help me out? Thanks. -- Mcasteel ------------------------------------------------------------------------ Mcasteel's Profile: http://www.excelforum.com/member.php...o&userid=15698 View this thread: http://www.excelforum.com/showthread...hreadid=277143 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
Can vlookup return multiple matches in a single cell? | Excel Discussion (Misc queries) | |||
User input in cell | Excel Programming | |||
jumping to a cell which matches user specified text | Excel Programming |