Multiplying values from different rows

Pettor

Board Regular
Joined
Aug 8, 2015
Messages
175
Hello all,


I am now learning SQL and I have one question. I would like to retrieve the last row's data from the table above it.
Meaning that I would like to group the data based on the number 10248, receiving the product of the three numbers of the table rows (11*42*72).
Probably for someone else this should be super easy but I don't know the methodology to do something like that.
Every help is much appreciated. Thanks!


A B C


1 10248 11
2 10248 42
3 10248 72




10248 3 33264
 
vba log function (used in MSAccess, and unlike the Excel Log() function) returns natural log so that's why it works.

vba: exp((log(11)+log(42)+log(72)))
excel: 10^(log(11)+log(42)+log(72))
excel: exp(ln(11)+ln(42)+ln(72))

all give answer the same answer of 33264

yikes

Okay, that explains it then. VBA (and SQL apparently) log function uses base e whereas Excel log function uses base 10. What a pain in the butt.

Interesting, but a pain.
 
Last edited:
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,225,626
Messages
6,186,092
Members
453,337
Latest member
fiaz ahmad

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