Spreading a value over multiple colums/rows

jorge1

New Member
Joined
Oct 14, 2008
Messages
6
I was wondering if you can point me in the right direction.

I need to have a macro of formula that would take a cell's value (value1)and spread it over equally over a number (value2) of columns across

A B C D E ...
1 $300 3 $100 $100 $100
2 $20 4 $5 $5 $5 $5
etc.

The expectation is to place a formula like this:
=dividevalue(A1,A3) in Col3 and it does the rest magically!

Is there a preset formula to do this?
Thanks!
 
Yes, it's clearer but considerably more complex! I think a macro approach would be more feasible now but would still be a considerable undertaking.

BTW, could any of the figures in the upper table be > 1? For example, could you sell two (or more) Sevice 4s in col 6?
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Yes - the figures can be > 1

Mmm... I was really trying to avoid the macro rout, because of maintainability... but I totally understand if that is the way to go...

Many thanks for the help!
J
 
Upvote 0
Yes - the figures can be > 1

Mmm... I was really trying to avoid the macro rout, because of maintainability... but I totally understand if that is the way to go...

Many thanks for the help!
J
Well, that's just my view and it's an undertaking that I don't think I can justify putting that much time to on a free forum like this, sorry. Pity, a few posts ago I thought we had a very satisfied customer. :)
MANY, many thanks! You've made my week

Perhaps somebody else might come along and see an easy way to do it, I don't know?
 
Upvote 0
jorge1

Welcome to the MrExcel board!

For a formula approach, copy the formula below across and down.

Spread

ABCDEFGH

<tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]
[TD="align: right"]300[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]100[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
C2=IF(COLUMNS($C2:C2)>$B2,"",$A2/$B2)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Thank you for this. It worked like a charm. You made my week!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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