and take all the time which is necessary to fully understand the mechanics of the suggested UDF ...]]>

and take all the time which is necessary to fully understand the mechanics of the suggested UDF ...

]]>Thanks again for the helpful tip royUK, you've really been a big help!]]>

Thanks again for the helpful tip royUK, you've really been a big help!

]]>I'll do with worksheet cell colors.

]]>(Code, 68 lines)

]]>

Code

- Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
- Sheets("Sheet2").Range("AJ4:AQ5").Cells.ClearContents
- With Target
- If Not Intersect(Target, Range("D7:D130")) Is Nothing Or .Cells.CountLarge > 1 Or IsEmpty(Target) Then
- Sheets("Sheet2").Range("I3").Value = .Offset(, -1).Value
- Sheets("Sheet2").Range("K3").Value = .Value
- Sheets("Sheet2").Range("Q3").Value = .Offset(, 1).Value
- If Not .Offset(0, 7) = Empty Then
- Sheets("Sheet2").Range("AJ4").Value = .Offset(0, 7).Value
- Sheets("Sheet2").Range("AJ5").Value = "South"
- End If
- If Not .Offset(0, 9) = Empty Then
- Sheets("Sheet2").Range("AM4").Value = .Offset(0, 9).Value
- Sheets("Sheet2").Range("AM5").Value = "East"
- End If
- If Not .Offset(0, 12) = Empty Then
- Sheets("Sheet2").Range("AP4").Value = .Offset(0, 12).Value
- Sheets("Sheet2").Range("AP5").Value = "West"
- End If
- Else
- If Not Intersect(Target, Range("E7:E130")) Is Nothing Or .Cells.CountLarge > 1 Or IsEmpty(Target) Then
- Sheets("Display").Range("I3").Value = .Offset(, -2).Value
- Sheets("Display").Range("K3").Value = .Value
- Sheets("Display").Range("Q3").Value = .Offset(, -1).Value
- If Not .Offset(0, 4) = Empty Then
- Sheets("Display").Range("AG4").Value = .Offset(0, 4).Value
- Sheets("Display").Range("AG5").Value = "North"
- End If
- If Not .Offset(0, 6) = Empty Then
- Sheets("Display").Range("AJ4").Value = .Offset(0, 6).Value
- Sheets("Display").Range("AJ5").Value = "South"
- End If
- If Not .Offset(0, 8) = Empty Then
- Sheets("Display").Range("AM4").Value = .Offset(0, 8).Value
- Sheets("Display").Range("AM5").Value = "East"
- End If
- If Not .Offset(0, 11) = Empty Then
- Sheets("Display").Range("AP4").Value = .Offset(0, 11).Value
- Sheets("Display").Range("AP5").Value = "West"
- End If
- End If
- End If
- End With
- Sheets("Sheet2").Activate
- End Sub

In order to get a simple count, you are using

(Code, 5 lines)

which can be achieved with a one-line instruction

(Code, 1 line)

Would encourage you to completely re-visit your entire code ...

Hope this will help

]]>

In order to get a simple count, you are using

which can be achieved with a one-line instruction

Would encourage you to completely re-visit your entire code ...

Hope this will help

]]>you should not hesitate to come back to the Forum ...]]>

you should not hesitate to come back to the Forum ...

]]>Good Luck ...]]>

Quote

But I just go on with the discussion on Mr.Excel

Good Luck ...

]]>Post back if you need further help.

Visit my web site, http://www.excel-it.com, for more examples and some helpful articles.]]>

Post back if you need further help.

Visit my web site, http://www.excel-it.com, for more examples and some helpful articles.

]]>Thanks a lot for pointing out the question is related to Open Channel Flow course ....

and for providing the definite integral ]]>

Thanks a lot for pointing out the question is related to Open Channel Flow course ....

and for providing the definite integral

]]>Post back if you need further help.

Visit my web site, http://www.excel-it.com, for more examples and some helpful articles.

]]>There are several possibilities offered by Excel for weighted averages ...

Best thing to do is to attach a sample file ... to illustrate your expected result ...]]>

There are several possibilities offered by Excel for weighted averages ...

Best thing to do is to attach a sample file ... to illustrate your expected result ...

]]>May be... you only need to use the formula =ADDRESS(MATCH(D2, C:C, 0),1)

If not, do not hesitate to attach a sample file ... showing your expected result ...]]>

May be... you only need to use the formula =ADDRESS(MATCH(D2, C:C, 0),1)

If not, do not hesitate to attach a sample file ... showing your expected result ...

]]>Thanks a lot for your Thanks ...

Thanks a lot for your Thanks ...**AND** for the **Like**