# Splitting commission

#### chriskenny

##### New Member
 M N O P Q R S I put staff no. in here I have a formula in here when it generates sales person name after entering her staff no. in column M - formula is =INDEX('Staff info'!\$a\$3:\$a\$22,match(\$Q2,'Staff Info'!\$G\$3:\$G\$22,0)) Formula in here for single sales =IF(G34="YES,25%,20%)*12 I have this as where I enter Y OR N if split commission Same as M Same as N Split amount goes

<tbody>
</tbody>

<tbody>
</tbody>

So what I would like to do is:

1. if I put Y in column P I would like the figure in column O divided by 2 and this amount put into column O & S
2. If I put N in column P then the whole figure would go in column O

I hope this makes sense

#### Special-K99

##### Well-known Member
"1. if I put Y in column P I would like the figure in column O divided by 2 and this amount put into column O & S
2. If I put N in column P then the whole figure would go in column O"

You want to change the existing figure in column O (which is based on a formula)?

You cannot do this with formulas, you need VBA for this.

A cell can contain a formula or a value, not both.
A cell can be the result of a formula looking at another cell but if it already contains a value or a formula the cell itself cannot be changed, only by VBA.

Last edited:

#### FormR

##### MrExcel MVP
1. if I put Y in column P I would like the figure in column O divided by 2 and this amount put into column O & S
2. If I put N in column P then the whole figure would go in column O
Hi, something like this maybe.

#### Special-K99

##### Well-known Member

in O34
IF(P34="","",IF(G34="YES",25%,20%)*12/((P34="YES")*2+(P34="NO")*1))

in S34
=IF(P34="YES",O34,"")

Last edited:

#### Fluff

##### MrExcel MVP, Moderator
Cross posted multiple sites.

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

Last edited:

1,078,504
Messages
5,340,766
Members
399,394
Latest member
farlow

### This Week's Hot Topics

• Problem with Radio Button's format control
I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
• Last Display on userform to a Listbox
[CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
• Rename and move files to a new location
Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
• Help with True/False Formula
Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
• Clear extra characters from a provided range of cells
Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
• Help with Current and highest streaks
Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...