View Single Post
  #5   Report Post  
Harald Staff
 
Posts: n/a
Default

Hi Julie

Nice.
This is good for spesific tasks. If we were to write these as general
solutions, the Criteria parameter should be able to handle inputs like

12
Julie
=C14
=C14/B14
=12*C14
=MAX(12,C14)

Should be a fun thing to do. Hope I'll find time to play with it.

Best wishes Harald

"JulieD" skrev i melding
...
liked Harald's Concat_Range so much thought i would try my hand at the
Concat_IF one - this is my first version which really needs some work in
making the range_to_concatenate flexible - this code will concatenate the
column to the left of the range_to_check (ConcRange)

---
Public Function CONCAT_IF(ConcRange As Range, ConcCrit As String, _
Optional DelimitWith As String) As String

Dim Cel As Range
For Each Cel In ConcRange

If Cel.Text = ConcCrit Then CONCAT_IF = _
CONCAT_IF & Cel.Offset(0, 1).Text & DelimitWith
Next
If CONCAT_IF < "" Then _
CONCAT_IF = Left$(CONCAT_IF, _
Len(CONCAT_IF) - Len(DelimitWith))
End Function
---

Cheers
JulieD