![]() |
IF Function
Hi
i have a doubt on IF function, i have two columns Name and DEPT, if we have A in column Name then the Dept will be Apple, and if allready name is filled in DEPT column (example 'Bun')then the IF function should not change any thing it should be as it is. Example: Name DEPT A =IF(A2="A","APPLE",?) A =IF(A3="A","APPLE",?) B BUN |
IF Function
You can't do that with a formula, the cell either has a value or a formula,
it cannot have both. Either use another column or use VBA. -- __________________________________ HTH Bob "Ranjit kurian" wrote in message ... Hi i have a doubt on IF function, i have two columns Name and DEPT, if we have A in column Name then the Dept will be Apple, and if allready name is filled in DEPT column (example 'Bun')then the IF function should not change any thing it should be as it is. Example: Name DEPT A =IF(A2="A","APPLE",?) A =IF(A3="A","APPLE",?) B BUN |
IF Function
Right click sheet tabview codeinsert this
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Columns(1)) Is Nothing Then Exit Sub If Len(Application.Trim(Target.Offset(, 1))) 0 Then Exit Sub If UCase(Target) = "A" Then Target.Offset(, 1) = "Apple" End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Ranjit kurian" wrote in message ... Hi i have a doubt on IF function, i have two columns Name and DEPT, if we have A in column Name then the Dept will be Apple, and if allready name is filled in DEPT column (example 'Bun')then the IF function should not change any thing it should be as it is. Example: Name DEPT A =IF(A2="A","APPLE",?) A =IF(A3="A","APPLE",?) B BUN |
All times are GMT +1. The time now is 10:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com