confusing formula

deuce

Active Member
Joined
Oct 6, 2006
Messages
346
Office Version
  1. 2007
Hi,

I have a list of different names/values in multiples of -n, however I find that the IF formula which I created is applying formulas incorrectly. (if(and(b3<b2, b3<b4), Column A1, 0)

I'll use 3 occurences of unique names as an example: Column A : Mike, Mike, Mike, John, John, John, Jane, Jane, Jane, Andrew, Andrew, Andrew, Peter, Peter, Peter, Jason, Jason, Jason.

In Column B: 1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,8,8,8,9,9,9,10,10,10.

The trouble arises when I drag the formula down, and I'm exhausted working on this.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can you please explain what you are trying to do and what the outcome should be?
 
Upvote 0
The outcome required is that the formula should calculate based on the name of the person and output that result if condition is true.
 
Upvote 0
Is this what you want?
+Fluff 1.xlsm
AB
1
2Mike1
3Mike1
4Mike1
5John2
6John2
7John2
8Jane3
9Jane3
10Jane3
11Andrew4
12Andrew4
13Andrew4
Master
Cell Formulas
RangeFormula
B2:B13B2=IF(A2<>A1,N(B1)+1,B1)
 
Upvote 0
When the formula i posted is applied to cells then everything is okay. when the formula is dragged down past that then the formula gives the wrong results probably due to name/formula overlap(?).

fluff i don't understand how that formula works.
 
Upvote 0
Can you please explain exactly what you are trying to do & post some sample data along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
to better explain.

in A2,A3,A4 you have names
in D2,D3,D4 & E2,E3,E4 have random figures
in F2 input the formula i posted initially and drag it down
on the 4th cell you'd notice the formula referring to the cell above it, and in order for me to get the correct result I have to modify references in the 4th cell and drag them down 2 rows then again change the formula references/output references each time there is a name change. when the name changes that's when the formula goes haywire.
 
Upvote 0
That does not tell me what you are trying to do, nor does it show me what your expected results are.
 
Upvote 0
fluff, the formula posted by you is not giving the required results. it has to calculate in batches of 3, when there is a name change in column A it would be applicable to those 3 cells and not any above that changed name in column A.

so for example the formula for john john john has to change and be applicable to andrew andrew andrew and not john andrew andrew(wrong results).

hope this helps.
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,847
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top