Visible Cells help

Terb123

New Member
Joined
Sep 8, 2023
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I'm wondering if someone could help me, please?

I've searched on Google and can't find the answer lol

I have an Excel sheet that calculates my sales, profit, R.O.I, etc)

I have applied a filter to a column, and have used SUBTOTAL to the cells so that the values change depending on the visible data.

The problem I'm having is my R.O.I. I would like the R.O.I to show the percentage depending on the date range.

I can't use SUBTOTAL though as I'm using division to workout my R.O.I.

Does anyone know a formular I can use that will divide the 2 values (total cost-total profit) but only on the visible cells?

Many Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hard to say without your data but I'm going to guess it's something along the lines of an array formula (Ctrl-Shift-Enter) like:
Excel Formula:
=AVERAGE(IF(SUBTOTAL(2,OFFSET(Table1[[#Headers],[cost]],ROW(Table1[cost])-ROW(Table1[[#Headers],[cost]]),0,1)),(Table1[profit])-Table1[cost]/Table1[cost],""))
 
Upvote 0
Thanks for the reply. My data is C1 = cost and D1 = profit. My R.O.I
percentage is in E1. Thank You
 
Upvote 0

Forum statistics

Threads
1,215,093
Messages
6,123,067
Members
449,090
Latest member
fragment

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