Forum Discussion

QwertyMartijn's avatar
QwertyMartijn
Helper II
3 years ago
Solved

Fill column based on matching value

Hi guys,

 

I have the following situation:

 

Project numberAmount of housesPoints of repair
00811-CVZ 1
0081121 
00811-K 7
00811-H 3
00811-BMN 0
00422-01 4
00422-02 2
0042224 

 

What my data does is that the amount of houses is paired to the main project number (which is 00422 or 00811) and the amount of repairs is paired to the house numbers within that main project.

 

Now i want to calculate the average points of repair per project. So for project 00422 it would be 4 + 2 / 24.

I want to write a code that if the invidiual house code contains the code of the main project, it calcualtes tthis average...