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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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
Just tried the formula. When I get to row 577 using the formula it seems to break and result in zeros.
 
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
276
260
784
876
710
587
Data B
2.4%
1.5%
0.9%
0.5%
0.4%

<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>
Expected Results
6.554144
4.278875
2.539997

<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>

Formula results
6.554144
6.169013
18.60051

<colgroup><col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>

<colgroup><col></colgroup><tbody>
</tbody>
 
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,216,089
Messages
6,128,760
Members
449,466
Latest member
Peter Juhnke

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