Good morning all,
I am new and not sure I am following proper protocol, but here it goes.
I made an Excel sheet that in essence uses many sheets to track data then compile, reformat, and then display on a very pretty front sheet according to date entered by user.
One this front sheet, there are many different ConcatenatesIfs formulae pulling from many different back sheets. On my computer and the computers of the majority of people this file opens, runs, and the date searchable information populates as it should via ConcatenateIfs formulae. (if more of the functionality needs to be explained or the sheet is needed please let me know) [Note that all of these people are running Excel 2010.]
Here is an example of the ConcatenateIfs formula that is breaking Excel for some people:
=ConcatenateIfs('sheet1'!$F$4:$F$500,sheet1'!$C$4:$C$500,'frontsheet'!C25,'sheet1'!$A$4:$A$500,'frontsheet'!$N$1,", ")
Basically this pulls the comments from sheet 1 (column F) that correspond to the title in sheet 1 column C and date in sheet 1 column A that match the title listed in cell front sheet C25 and date listed in front sheet N1.
However, on a hand full of computers, including that of the client, this sheet displays the following error and them promptly crashes Excel:
Function ConcatenateIf(CriteriaRange As Range, Condition As Variant, ConcatenateRange As Range, Optional Separator As String = ",") As Variant
'Update 20150414
Dim xResult As String
On Error Resume Next
If CriteriaRange.Count <> ConcatenateRange.Count Then
ConcatenateIf = CVErr(xlErrRef)
Exit Function
End If
For i = 1 To CriteriaRange.Count
If CriteriaRange.Cells(i).Value = Condition Then
xResult = xResult & Separator & ConcatenateRange.Cells(i).Value
End If
Next i
If xResult <> "" Then
xResult = VBA.Mid(xResult, VBA.Len(Separator) + 1)
End If
ConcatenateIf = xResult
Exit Function
End Function
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
This gets even weirder as a different file with the same type of functionality and ConcatenateIfs formulae is able to be opened on the very computers that crash when opening mine.
I have run diagnostic software and the file is not corrupted. I initially thought maybe the file is too big/complex and is just crashing excel, but the other, different file with similar functionality is actually bigger and more complex.
Could really use some help here as I have no idea what is going on and the type of VBA/coding is very much out of my realm of expertise and understanding.
Thank you all in advance for your time and help.
Bookmarks