tonycromero
asked on
I need to make CellA2 value dependable from value of CellA2.
For each 12 units of CellA1 make CellA2 1 more
A1 A2
12 1
13 1
14 1
24 2
25 2
28 2
30 2
36 3
in other words only when is a multiple I add one more
A1 A2
12 1
13 1
14 1
24 2
25 2
28 2
30 2
36 3
in other words only when is a multiple I add one more
Try this.....
In B2
Is this what you are trying to achieve?
In B2
=IF(MOD(A2,$A$2)=0,MAX(B$1:B1)+1,B1)
and copy down.Is this what you are trying to achieve?
@schnellsolutions
+1
Good approach. That didn't strike me. :)
+1
Good approach. That didn't strike me. :)
Also I assumed that row1 is the header row and numbers start from A2.
Hehehe. But in the same way, with this simple formula you get the value and you don't need to worry for pasting it throw columns or rows.
=INT(A1/12)
Just with this simple thing you can get the desired result.
=INT(A1/12)
Just with this simple thing you can get the desired result.
ASKER
sktneer Thanks for your answer but it is not exactly what I am lucky for. I did not explain myself well.
I have two item
Item 1
Item 2
For every complete 12 units (1 case) of Item1 I have to calculate 1 unit of Item 2
So for every complete case of Item 1 I give away 1 unit of Item2.
I have two item
Item 1
Item 2
For every complete 12 units (1 case) of Item1 I have to calculate 1 unit of Item 2
So for every complete case of Item 1 I give away 1 unit of Item2.
I cannot correlate your requirement with the sample data you provided, probably I am missing the logic. My apologies.
It would be helpful, if you upload a sample workbook with two sheets Before and After.
Show what you have originally on Before sheet and show the desired output with some sort of explanation for your logic on After sheet.
That would help to understand your logic clearly.
It would be helpful, if you upload a sample workbook with two sheets Before and After.
Show what you have originally on Before sheet and show the desired output with some sort of explanation for your logic on After sheet.
That would help to understand your logic clearly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes that is what I need. Every 12 eaches of an item I have to add 1 unit as a gift.
So for 12 I give an extra 1
for 24 an extra 2
but in between if round down.
Thanks you all guys for your help
So for 12 I give an extra 1
for 24 an extra 2
but in between if round down.
Thanks you all guys for your help
=INT(A1/12)
It will returns you the integer value of dividing A1/12. Then after pasting the same formula for the rest of the cells it will change A1 for its corresponding value.