Formula Based Text based on certain criteria/range

suhas.sharma

New Member
Joined
Jan 10, 2012
Messages
8
Hello,

I am trying to get automated text (highlighted in color red) based on the selected range and need solution in cells which says Total (Apr-Dec) and Total (Feb-Nov). This label should be based on corresponding month where 1st value in counter row is 1 and corresponding month where last found value of 1 in counter row.

Something like "Total" & Formula & "-" & Formula for Total (Apr-Dec) based on range in counter row.

Thanks in advance genius's out there.

Counter000111111111Label
Month1-Jan-191-Feb-191-Mar-191-Apr-191-May-191-Jun-191-Jul-191-Aug-191-Sep-191-Oct-191-Nov-191-Dec-19Total (Apr-Dec)
Revenue$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$90,000
Counter011111111110Label
Month1-Jan-191-Feb-191-Mar-191-Apr-191-May-191-Jun-191-Jul-191-Aug-191-Sep-191-Oct-191-Nov-191-Dec-19Total (Feb-Nov)
Revenue$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$10,000$100,000

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
If you have the AGGREGATE function (Excel 2010 and newer) try:

="Total ("&TEXT(AGGREGATE(15,6,B2:M2/B1:M1,1),"mmm")&"-"&TEXT(AGGREGATE(14,6,B2:M2/B1:M1,1),"mmm")&")"


Otherwise you can use this formula:

="Total ("&TEXT(INDEX(B2:M2,MATCH(1,B1:M1,0)),"mmm")&"-"&TEXT(LOOKUP(2,1/B1:M1,B2:M2),"mmm")&")"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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