Multiple of a perticular number

Lazaeb

New Member
Joined
Aug 7, 2018
Messages
5
Hi,
I want multiple of a number.
For example i have to give a free gift when any one purchases 18 units. Now what i want is when "A" cell is 18 it should show "1" in B cell and when "A" cell is 36 "B" Cell should be "2".
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Assuming data in column A starts in row 1. Place this in B1 and copy down---> =IF(MOD(A1,18)=0,A1/18,"")
 
Upvote 0
Hi,

I think this should work:


Book1
AB
1150
2181
3301
4362
5482
6532
7603
Sheet170
Cell Formulas
RangeFormula
B1=INT(A1/18)
 
Upvote 0
Have you tried my solution. It will only show a result when divisible by 18
 
Upvote 0
Yes i tried but it gives zero when it is not divisable by 18.
My point is when it is 18 it shows 1 but when it is 20 it should remain 1 instead of 0. Likewise when it is 72 it should show 4 and when it is 74 it should show 4 instead of 0
 
Upvote 0
My point is when it is 18 it shows 1 but when it is 20 it should remain 1 instead of 0. Likewise when it is 72 it should show 4 and when it is 74 it should show 4 instead of 0
Have you tried jtakw's solution?
It does precisely that. It divides the numbers and drops the fractional part, so you can just left with the Integer portion (which based on your description, is what you want to happen).
 
Upvote 0
You're welcome, welcome to the forum.
 
Upvote 0
In B1, type 0, then in B2 type =IF(MOD(A2,18)=0,A2/18,OFFSET(A2,-1,1)) and copy down.
 
Upvote 0

Forum statistics

Threads
1,225,477
Messages
6,185,216
Members
453,283
Latest member
Shortm88

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