+ Reply to Thread
Results 1 to 5 of 5

need help with a If=then situation.

  1. #1
    FireBrick
    Guest

    need help with a If=then situation.

    I have a little Excel file to use transcribing some old paper data

    The field is a 4 digit number representing a 24 hour moment
    0522 would be 5:22 am.
    all I want to enter is they 4 digit number

    Many entries would be the same, as the entries all happened in the same
    minute
    so what I'd like to do, is...
    If I leave the field blank, it would fill itself with the time put into the
    field above it.
    All the fields in the column are 4 digit
    I tried to do a =if B4>=0, " " then B5=B6

    I'm missing something as I haven't done that much with Excel yet.

    Please and thank you.

    --


    -----------------------------------------------------
    2400 Baud makes you want to get out and push!!
    -----------------------------------------------------

    Bill H. in Chicagoland



  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    I think you could just put this in cell b5 and copy down as far as you (assuming you input a time in cell b4)

    =b4
    not a professional, just trying to assist.....

  3. #3
    Carim
    Guest

    Re: need help with a If=then situation.

    Bill,

    The easiest is a formula :
    =VALUE(LEFT(H6,2)&":"&RIGHT(H6,2))
    and then format the cell with time ...

    HTH
    Carim


  4. #4
    Rowan
    Guest

    RE: need help with a If=then situation.

    I'm not sure I follow your If-Then statement but this may help. This macro
    uses the Worksheet_change event (right click the sheet tab, select View Code
    and paste macro to the code sheet displayed).

    If you enter a value in column B any blank cells immediately above the cell
    just changed will be populated with the value of the last used cell in column
    B.

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim lastused As Long
    Dim counter As Long
    If Target.Column = 2 And Target.Row > 1 Then
    If IsEmpty(Target.Offset(-1, 0)) Then
    lastused = Target.End(xlUp).Row
    For counter = lastused + 1 To Target.Row - 1
    Cells(counter, 2).Value = Cells(counter - 1, 2).Value
    Next counter
    End If
    End If
    End Sub

    Regards
    Rowan

    "FireBrick" wrote:

    > I have a little Excel file to use transcribing some old paper data
    >
    > The field is a 4 digit number representing a 24 hour moment
    > 0522 would be 5:22 am.
    > all I want to enter is they 4 digit number
    >
    > Many entries would be the same, as the entries all happened in the same
    > minute
    > so what I'd like to do, is...
    > If I leave the field blank, it would fill itself with the time put into the
    > field above it.
    > All the fields in the column are 4 digit
    > I tried to do a =if B4>=0, " " then B5=B6
    >
    > I'm missing something as I haven't done that much with Excel yet.
    >
    > Please and thank you.
    >
    > --
    >
    >
    > -----------------------------------------------------
    > 2400 Baud makes you want to get out and push!!
    > -----------------------------------------------------
    >
    > Bill H. in Chicagoland
    >
    >
    >


  5. #5
    Franz
    Guest

    Re: need help with a If=then situation.

    "FireBrick" <[email protected]>ha scritto nel messaggio
    [email protected]

    > I have a little Excel file to use transcribing some old paper data
    >
    > The field is a 4 digit number representing a 24 hour moment
    > 0522 would be 5:22 am.
    > all I want to enter is they 4 digit number
    >
    > Many entries would be the same, as the entries all happened in the
    > same minute
    > so what I'd like to do, is...
    > If I leave the field blank, it would fill itself with the time put
    > into the field above it.
    > All the fields in the column are 4 digit


    I think this should work:
    1) menu Edit => Go to => Special... select the option Blank cells and then
    OK
    2) digit = and then with the up arrow select the cell above the first blank
    cell;
    3) press ctrl+enter;
    4) select the column with you filled in this way and then select Edit =>
    copy and after Edit => copy/paste Special Values.

    --
    Hoping to be helpful...

    Regards

    Franz

    ----------------------------------------------------------------------------------------
    To reply translate from italian InVento (no capital letters)
    ----------------------------------------------------------------------------------------



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1