Forum Discussion

AnnieMaisonneuve's avatar
AnnieMaisonneuve
Copper Contributor
Nov 03, 2022

Time sheet How to add 30 (number to cell if the cell before has value

Time sheet How to add 30 (number to cell if the cell before has value

9:05 17:05
9:00 17:00
9:00 17:00
9:00 17:00
9:00 17:00
   
   

 

Should become

9:053017:05
9:003017:00
9:003017:00
9:003017:00
9:003017:00
   
   
  • mathetes's avatar
    mathetes
    Silver Contributor
    =if(a1<>"",30,"")

    Assuming that "the cell before" means the one to the left of the cell in which this formula appears.

    Seems a strange request, however, so I'd feel more comfortable with the answer if you could explain more fully what the context is.
    • AnnieMaisonneuve's avatar
      AnnieMaisonneuve
      Copper Contributor
      Hi, I have succeed with : =SI(A1>0;"30";"")

      But when there is no value, it creates an error in the calculation of Total of hours/minutes
      I would like that "" do not create such error
      • mathetes's avatar
        mathetes
        Silver Contributor
        Try =SI(A1>0,30,0)

        Do NOT put the 30 in quotes.
    • AnnieMaisonneuve's avatar
      AnnieMaisonneuve
      Copper Contributor

      Hi, this is for a timesheet, based on 7 days of week, if employee entered from a form times on monday trough friday, and none for saturday and sunday, I want a 30 ( break in minutes) to appear in the cell ( break), the one after start time

      Can you look a the picture just sent, I have an error. I have a french excel

      A                                                    B     Minute break                         C

      Monday9:053017:05
      Tuesday9:003017:00
      Wednesday9:003017:00
      Thursday9:003017:00
      Friday9:003017:00
      Saturday   
      Sunday   

Resources