PDA

View Full Version : Search for blank cell based on two conditions



Panda
04-19-2011, 06:18 AM
Hey all,

Does anyone now some vba code to search for a blank cell within a column based on two conditions?

What I want to do is search a worksheet for an employee name, find their work status (are they in or out), if they are out AND if the Time Booked column is blank then enter the formula =Now().

The reason why I need this is because the worksheet records every time an employee signs out so there will me multiple occurrences of the same employee’s name.

Attached is an example of the spreadsheet that I am trying to work on

Any help would be greatly appreciated.

Thanks

Phil

Wireless Guy
04-19-2011, 09:45 PM
I need a little more clarification to help. A bigger data set would help too.

So someone is going to sign OUT. Where is that going to occur? Do you want to have a little User Interface on the front end to achieve that? Perhaps using a form or something?

I think you actually want to enter the current time, and not the now() function. Otherwise, whenever you open the sheet the times will change.

Are you just trying to get a punch clock with punch in and punch out and keep an audit trail of all of the times? There's probably a better way to do that.

=WG=

BrianMH
04-20-2011, 12:51 AM
I think this was a double post and another solution was found on this thread.
http://www.vbaexpress.com/forum/showthread.php?t=37089