Macro or Formula

AzharSham

New Member
Joined
Jan 4, 2018
Messages
5
All I have a 2 sets of data in 2 different sheets. Data A is 639 rows and Data B is 24 rows. I want to take the each value in Data A and Multiply it by the 24 different values in Data B. Essentially ending up with 15336 (639*24) rows of new data. Should I conduct this via a macro or formula using excel. Any assistance is appreciated.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Sheet3 A1= INDIRECT("Sheet1!A"&MOD(ROW(A1)-1,639)+1)*INDIRECT("Sheet2!A"&CEILING(ROW(A1)/24,1))

Hope it works ;)
 
Last edited by a moderator:
Upvote 0
Sorry, the right method should be:

Sheet3 A1= INDIRECT("Sheet1!A"&MOD(ROW(A1)-1,639)+1)*INDIRECT("Sheet2!A"&CEILING(ROW(A1)/639,1))
 
Upvote 0
Data A
[TABLE="width: 88"]
<colgroup><col></colgroup><tbody>[TR]
[TD="align: right"]276
[/TD]
[/TR]
[TR]
[TD="align: right"]260[/TD]
[/TR]
[TR]
[TD="align: right"]784[/TD]
[/TR]
[TR]
[TD="align: right"]876[/TD]
[/TR]
[TR]
[TD="align: right"]710[/TD]
[/TR]
[TR]
[TD="align: right"]587
Data B
[TABLE="width: 64"]
<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64, align: right"]2.4%[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]1.5%[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]0.9%[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]0.5%[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]0.4%[/TD]
[/TR]
</tbody>[/TABLE]
Expected Results
[TABLE="width: 64"]
<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]6.554144[/TD]
[/TR]
[TR]
[TD="align: right"]4.278875[/TD]
[/TR]
[TR]
[TD="align: right"]2.539997[/TD]
[/TR]
</tbody>[/TABLE]

Formula results
[TABLE="width: 64"]
<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]6.554144[/TD]
[/TR]
[TR]
[TD="align: right"]6.169013[/TD]
[/TR]
[TR]
[TD="align: right"]18.60051[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Doing some figuring out. The formula is actually reversed. I need to take Value 1 of Data A then Multiply by all of the data in Data B then move to next value in Data A.
 
Upvote 0
Then may be;

Sheet3 A1=
INDIRECT("Sheet1!A"&CEILING(ROW(A1)/639,1))*INDIRECT("Sheet2!A"&MOD(ROW(A1)-1,24)+1)
 
Upvote 0
No the formula above wont work. Try;

Sheet3 A1=
INDIRECT("Sheet1!A"&CEILING(ROW(A1)/24,1))*INDIRECT("Sheet2!A"&MOD(ROW(A1)-1,24)+1)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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