Hi,
I'm looking for a formula that can look through a worksheet, find a value and add together the cells next to it.
In essence I have a sheet that could have a value eg Oranges a number of times anywhere on it.
What I would like to be able to do is have a formula that looks for all the occurrences of "Oranges" and adds together the cells next to them. Ie if "Oranges" is in A1, D5, G32 I would want the total of the number in B1, E5 and H32.
Theoretically there is no limit to the number of times "Oranges" could appear but also no structure to the data (other than the next cell will always be a number)
I suppose I could use VBA to look through but was hoping there might be someway of doing it with a formula (Sumif and OFFSET maybe) as there may well be a need to look for different values at different times
Any thoughts appreciated.
I'm looking for a formula that can look through a worksheet, find a value and add together the cells next to it.
In essence I have a sheet that could have a value eg Oranges a number of times anywhere on it.
What I would like to be able to do is have a formula that looks for all the occurrences of "Oranges" and adds together the cells next to them. Ie if "Oranges" is in A1, D5, G32 I would want the total of the number in B1, E5 and H32.
Theoretically there is no limit to the number of times "Oranges" could appear but also no structure to the data (other than the next cell will always be a number)
I suppose I could use VBA to look through but was hoping there might be someway of doing it with a formula (Sumif and OFFSET maybe) as there may well be a need to look for different values at different times
Any thoughts appreciated.