Which version of Excel please?

Also, can we assume it looks something like this?

Company, Sales

A,12.23

B,51.22

B,11.22 *

B,

B,1.22 *

B,9.87 *

C,1.23

Where the * rows are the last 3 non-empty for B

Note also the assumption that the company records are contiguous.