Please help work out why this formula turns off

sleepers

Board Regular
Joined
May 26, 2004
Messages
203
Hi, this is in worksheet and works okay until i click out of the worksheet into another one, when i go back in the formulas have all gone to #value.. i have to go into tools/options/calculate/calculate sheet to get them back - what is doing this please because it stops all my lookup references fromworking once the data is decalulated (for want of a better word )



Code:
Function ConcatDay(rng As Range, item As String, Optional dte = True)
    Application.Volatile
    For Each ce In rng
        If ce <> "" And rng.Parent.Cells(3, ce.Column) = item Then
            If dte Then
                holder = holder & Format(ce, "d-m") & ", "
            Else
                holder = holder & ce & ""
            End If
        End If
    Next ce
    ConcatDay = Left(holder, Len(holder) - 2)
End Function

the code that i use in the cells is

Code:
=concatmth('Group Formula'!$C6:$IR6,D$2)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi there

If you can't find out why (and I don't know) perhaps you can use an event macro on that sheet that tells it to calculate every time the sheet is activated or deactivated?

regards
Derek
 
Upvote 0
Can you describe what you're actually trying to do with the code? As I'm seeing it, it looks like there's some missing, or you're using two different names for your function.
 
Upvote 0
i have rows with names and columns with dates, what i am trying to do is auto concantenate all columns within a range - say friday- so i will list all fridays showing available

its a avails list for musicians

i have one of these for days and one for months

sorry i put the code for one and the other together -

but they are both in system and do same error
 
Upvote 0
You could just filter the rows (or columns) so that only the days (or months) you choose will be visible.
 
Upvote 0
it has a cell for each day in each row for each artist..

i would be very hard to hide particular rows and i want to be able to just type in an artist name and it will show all dates avail for the desired month or all friday avail..

this formula does excatly what i want but i just looses the info some how
 
Upvote 0
how do i make it so that when a person opens or activates a worksheet - two sheets are automatically calculated so the data will always formulate
 
Upvote 0
You could use something like this, in that sheet's code module:

Code:
Private Sub Worksheet_Activate()
Dim Sh As Worksheet

    For Each Sh In Sheets(Array("Sheet1", "Sheet2"))
        Sh.Calculate
    Next

End Sub

HTH
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top