How to set column conditionally in Excel?

70 Views Asked by At

I have been working on a spread sheet for work for about a week and a half now and have been stuck in the same place. I am working on something for payroll purpose. So A1 would have an employee name as would the rest of the column. B2 would have that specific employees hours worked.

for example.

  A              B
1 Doe, John C    6.65

I need a formula that will automatically move anyone that has hours greater than 0 to column E, along with their worked. hours.

1

There are 1 best solutions below

1
On BEST ANSWER

If you want the name in column E and the worked hours in column F then set E1 to

=IF(B1>0,A1,"")

and set F1 to

=IF(B1>0,B1,"")

If you want the name and worked hours both in column E then set E1 to

=IF(B1>0,CONCATENATE(A1," ",B1),"")

and copy down the column.

IF(condition, expression if true, expression if false) allows you to set cells based on a logical condition. CONCATENATE allows you to join the contents of multiple cells (or expressions) together as a string.