#1   Report Post  
ExcelStress
 
Posts: n/a
Default IF Function


What formula would I use if I want to check 5 different cells and if
they are all equal then show In Balance , if not equal show Out of
Balance ?
Any help would be appreciated .
I know the formula to use if only comparing 2 cells , but can't figure
out how to compare more than 2 .

Thank you !


--
ExcelStress
  #3   Report Post  
cscorp
 
Posts: n/a
Default


Enter this function in a VBA MOdule in the workbook:

Function Balance(A, B, C, D, E) As String
'A,B,C,D,E are the references to the cells to be compared
If (A = B) And (B = C) And (C = D) And (D = E) Then
Balance = "In Balance"
Else
Balance = "Out Balance"
End If

End Function

Then enter the function name in the spreadsheet:
It will print "In Balance" / "Out Balnace" depending on the values in
cells A,B,C,D,E

Juan Carlos


--
cscorp
------------------------------------------------------------------------
cscorp's Profile: http://www.excelforum.com/member.php...o&userid=24015
View this thread: http://www.excelforum.com/showthread...hreadid=376556

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
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


All times are GMT +1. The time now is 04:07 PM.

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

About Us

"It's about Microsoft Excel"