Posts by wid2001

    I appreciate the responses. I have queried the cells and they are showing as truly blank. I am still tweaking it and trying to figure out the problem. I tried adjusting the empty criteria and still have the same problem. I will post an answer if I come up with a solution. Thanks again for everyone's help.

    Thanks for the response. It seems to work fine where I have cells with data, but it is populating all blank cells with 01/00/00 for a date. Any ideas on what I am doing wrong to have it skip blank cells (leave them blank)?

    I have what seems like it should be a simple piece of code but I have too many gaps in my own knowledge base to figure out. I have found multiple pieces in my research but have been unable to pull it all together. I need to remove the time stamp from date time values in a column. Some of the cells are blank. I want to do nothing if the cell is blank, if the cell has a date time value I want to strip out the time value, and then continue to the end.




    [VBA]Sub ToDate()
    Dim LR As Long, i As Long
    LR = Range("I" & Rows.Count).End(xlUp).Row
    For i = 2 To LR
    If Not IsEmpty(Cells(i, 2)) Then


    With Range("I" & i)
    .NumberFormat = "mm/dd/yy"
    .Value = CLng(.Value)

    End With
    End If
    Next i


    End Sub[/VBA]


    If anyone can help me correct my code I would appreciate it.


    Thanks!

    Re: VBA Userfrom to Calculate Risk assessment


    I closed the other threads on the other forums as well. Thanks for pointing out what should have been obvious to me from the beginning. The only one I have open still is on Chandoo.org. If I can't get it figured out I will post a link as I should have done to begin with. I have someone looking at it now and has been very helpful to this point. It's often times hard to convey meaning in text but no offense taken at the correction just trying to be mindful of everyone's time in an effort to maintain the forums as a resource and once educated a little more possibly contribute as well. It may be a while until I become useful. Thanks again, I think your correction has been one of the most valuable posts I've received so far.

    Re: VBA Userfrom to Calculate Risk assessment


    royUK,
    thanks for letting me know. I thought that would help but I can see where that would be the case and create a problem. I am new to posting and had not read that previously. I will ensure that I do not cross post in the future. Thanks for taking the time to educate me.

    I am replicating a risk assessment form in excel. I would like to have a userform for data entry and calculation of values and then print a completed form for signature. I am learning VBA and am making good progress but have a ways to go still. I am not trying to get the form designed and completed by anyone just looking for a way to get started with some of the sections. Of particular concern are the sections where there are three columns and only the highest column total is used. I'm also still trying to work out how, on designated entries they automatically make the overall risk a medium or high regardless of total risk value. I can not decide if I should utilize VBA to calculate everything or maybe create a userform that enters data onto a hidden sheet where it is calculated and then sent to the actual form that gets printed. I am looking to utilize good practices so that when I move to a different position the form can be modified and updated as needed. Hopefully this isn't too cryptic and with the attached pdf original someone will have an idea of what I am attempting to do.


    Closed.

    I need to write a vba procedure for the following. I have two columns on a spreadsheet. The left column represents time and the right column represents the corresponding degrees above the horizon for the moon. The time starts with moonrise and continues for a 24 hour period using minutes (1400 total). The moon angle typical starts at about -1 at moonrise. What I need to do is write a procedure that will look through he moon angle column and when it gets to 30 degrees above the horizon return the associated time to a cell on another sheets then I need it to continue through the same column and return the time the moon falls back below 30 degrees. This will be run from a user form to populate cells on a card containing solar and lunar data for an aviation knee card/checklist. Any ideas?