[EMAIL PROTECTED] wrote:

In the first column (Column A), list the customer's name and in the next column (Column B), list 
the value of each sale.  Now, assuming that you have several sales people, lets make the next 
column, (Column C) contain each sales person's name or ID.  In the columns adjacent to the sales 
person's name, Columns D, E, F, G, H, etc. depending upon how many sales people you have), enter 
the following formula in each cell below the name [=if(cell("content",Column 
C_row#)="sales person's name or ID", Column B sales value_row#, 0)
As far as I can tell, Calc's CELL() function does the same thing as Excel's. If I may translate the example:

A1:   "Bloggs"
B1:   $20
C1:   "Smith"
C2:   =if(cell("contents"; $C1) = "Smith"; $B1; 0)
Ditto for columns D, E, F ... (i.e. additional sales people)

This should work fine in Calc.

But why not just:

C2:   =if($C1 = "Smith"; $B1; 0)

A slightly better arrangement might be to have D1, E1, etc. contain each sales person's name and then start with customer sales records at row 2, with the sales person for each customer record in column C as you had originally. Then you could use:

D2:   =if($C2 = D$1; $B2; 0)

You can then just copy the formula from D2 to every cell in the range D2, En (i.e. the cell references will be adjusted correctly automatically).

Ross

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to