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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

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