#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 83
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"