Formula to add increments of 5 and 1 in the same cell

fredtriest

New Member
Joined
Nov 2, 2016
Messages
14
I was hoping to get assistance with a formula that will look at a numeric value in one cell, and then apply a formula that will take that number and apply itself to another cell with custom text and make increments of +1 on an entirely different number (starting at 1).

For example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]5
[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$5 can buy 1 widget to take home [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$5 can buy 1 widget to take home [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$5 can buy 1 widget to take home [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$10 can buy 2 widgets to take home[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$10 can buy 2 widgets to take home[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$15 can buy 3 widgets to take home[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$15 can buy 3 widgets to take home[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][TABLE="width: 238"]
<tbody>[TR]
[TD="class: xl65, width: 238"]$15 can buy 3 widgets to take home[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]30[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Any help is greatly appreciated!
 

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.
Your pattern would seem to indicate dividing by 5. If this is the case this would be simpler.

If that's the case, then this formula would work:
=DOLLAR(A1,0)&" can buy "&TEXT(A1/5,"[=1]0 ""widget"";0 ""widgets""") & " to take home"

Copy down.
 
Last edited:
Upvote 0
I haven't worried about the actual value to be held in A1 except that it must be a multiple of 5.
Formula in B1:
=IF(A1=5,CONCATENATE("$",A1," can buy ",A1/5," widget to take home"),CONCATENATE("$",A1," can buy ",A1/5," widgets to take home"))
 
Upvote 0
Scott's version is tidier (I'm just working out the equivalent of my IF in his formula). Anyway, if your are not used to the IF function then keep that in mind for other purposes, it is quite useful.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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