Results 1 to 16 of 16

Strange errors I think coming from ConcatenateIfs [UDF]

Threaded View

  1. #1
    Registered User
    Join Date
    06-21-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    9

    Strange errors I think coming from ConcatenateIfs [UDF]

    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.
    Last edited by 6StringJazzer; 06-21-2017 at 09:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. DataObject/Clipboard coming out with strange characters
    By quekbc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-25-2015, 06:48 PM
  2. Extended a sumproduct formula that is coming up with errors
    By Beh162 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-03-2015, 07:05 PM
  3. Concatenateifs
    By ZmeY in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2015, 12:34 PM
  4. 2 strange errors?
    By Kosmosis in forum Excel General
    Replies: 8
    Last Post: 09-09-2010, 02:37 AM
  5. hiding the column...errors coming
    By ss_bb_24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2007, 07:30 AM
  6. Strange Errors in calculating Week-No
    By dvdung in forum Excel General
    Replies: 7
    Last Post: 09-11-2007, 03:56 AM
  7. strange error calculations provides errors until i add any new one
    By Subzizo in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-08-2005, 07:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1