Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
How about
=IF(COUNTIF($A$1:$E$1,A1)=5,"In Balance", "Not In Balance") -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "ExcelStress" wrote in message ... 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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date & Time | New Users to Excel | |||
Automatically up date time in a cell | Excel Discussion (Misc queries) | |||
clock | Excel Worksheet Functions | |||
Need a ISWorkday Function -- Any Ideas | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions |