Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 TNB Excel Spreadsheet for new Domestic Tariff, Old, non-ToU & ToU + Single Cell Formula

views
     
TSsoonwai
post Sep 5 2025, 02:23 AM, updated 4w ago


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


Thought I share this here. Hope someone finds it useful. Created on Excel 365 16.102 (macOS).

This is a TNB usage Excel Spreadsheet for old, new tariff non-ToU and ToU.
• table to enter your daily 30-min usage data
• it'll use the correct AFA for both months (hopefully)
• support for off-peak public holidays
• single cell formulas
• calculation may be off if used for less a full billing period (28, 30, 31 days)
• sometimes still off by 1 sen (rounding error somewhere)

Where to Enter your TNB CSV Data
» Click to show Spoiler - click again to hide... «


Features

» Click to show Spoiler - click again to hide... «
TNB Usage Stats Mainly to see your peak percentage before changing to ToU. My initial objective before I went overboard. Excel is quite addictive.

» Click to show Spoiler - click again to hide... «
Date and Period Slicers Slicers to quickly select the day or billing period that you want to examine.

» Click to show Spoiler - click again to hide... «
Power Budgeting I use this to see how much more kWh I have for this month if I want to stay below 400 kWh. Maybe a bit too much micro-managing. sweat.gif

» Click to show Spoiler - click again to hide... «
Tariff Comparison Compare bills in different domestic tariffs; old, non-ToU & ToU. This is where the single-cell formulas for the 3 tariffs are used.

» Click to show Spoiler - click again to hide... «
Bill Breakdown It's the same as your paper bill.

» Click to show Spoiler - click again to hide... «
Graphs One of the sample graphs to compare day before and yesterday's usage by hour. Can change the PivotChart fields to compare all sorts of things. Use the Timeline to set the days.

» Click to show Spoiler - click again to hide... «
More Graphs This one is set to display the current month's daily usage.

How to update? Delete the existing sample data from the table and copy & paste your own data form the older spreadsheet.

Updates
20250914_1639: Attached File  TNB_Usage_Cost_20250914.xlsx.zip ( 302.86k ) Number of downloads: 33

• Fix date calc in the Forecast part of the sheet

20250913_1904: Attached File  TNB_Usage_Cost_20250913.xlsx.zip ( 303.12k ) Number of downloads: 7

• Played around with the Stats & Forecast bit of the spreadsheet.
• Fix a bug with number of days calculation.
• Trying to fix up the graphs with better slicers.
• Cleaned up a bit. Still messy, sorry.

20250910_1811: Attached File  TNB_Usage_Cost_20250910.xlsx.zip ( 268.38k ) Number of downloads: 28

• Deleted the code and all that since everything is in the Excel file.
• Update with screenshots and explanations.

20250910_1147:

• Uploaded Excel file. The single cell formulas are on the Tariff sheet.
• Now includes formulas for old, non-ToU & ToU.

This post has been edited by soonwai: Sep 14 2025, 05:00 PM
bee88
post Sep 5 2025, 07:48 AM

Getting Started
**
Junior Member
299 posts

Joined: Apr 2011
QUOTE(soonwai @ Sep 5 2025, 02:23 AM)
Thought I share this here. Hope someone finds it useful.

This is a TNB single cell formula for new tariff non-ToU. (Later add ToU)
• it'll use the correct AFA for both months (hopefully)
• calculation may be off if used for less a full billing period (28, 30, 31 days)
• sometimes still off by 1 sen (rounding error somewhere)

Example:
user posted image
You enter Billing Start Date and Usage. Formula goes into the 3rd cell.

You will need to setup Tables & Named cells. The ones in purple.
user posted image
Tables (3):
TenagaNonTOU_Table
ICT_Table
AFA_Table

Named Cells (5):
kapasiti
rangkaian
peruncitan
sst
kwtbb

Remember to change:
_startdate,A2,
_kwh,B2,
to your respective cells.

CODE
=LET(
_startdate,A2,
_kwh,B2,
_kapasiti,kapasiti,
_rangkaian,rangkaian,
_peruncitan,peruncitan,
_sst,sst,
_kwtbb,kwtbb,
_kwhNoST,IF(_kwh>600,600,_kwh),
_kwhST,IF(_kwh>600,_kwh-600,0),
_rate,XLOOKUP(_kwh,TenagaNonTOU_Table[Tenaga],TenagaNonTOU_Table[Rate],"not found",1),
_ICTRate,XLOOKUP(_kwh,ICT_Table[ICT],ICT_Table[Rate],"not found",1),
_ICTNoST,IF(_kwh>600,_ICTRate*600,_ICTRate*_kwh),
_ICTST,IF(_kwh>600,_ICTRate*(_kwh-600),0),
_subTotalKBB,_rate*_kwhNoST + _rate*_kwhST+_kapasiti*_kwhNoST+_kapasiti*_kwhST+_rangkaian*_kwhNoST+_rangkaian*_kwhST+_ICTNoST+_ICTST,
_prorateA,(DAYS(EOMONTH(_startdate,0),_startdate)+1)/(DAY(EOMONTH(_startdate, 0))),
_AFARateA,XLOOKUP(EOMONTH(_startdate,-1)+1,AFA_Table[AFA],AFA_Table[Rate],"not found",-1),
_prorateB,(DAYS(EDATE(_startdate,1),EOMONTH(_startdate,0)+1))/(DAY(EOMONTH(_startdate, 0))),
_AFARateB,XLOOKUP(EOMONTH(_startdate,0)+1,AFA_Table[AFA],AFA_Table[Rate],"not found",-1),
_subTotalkwhST,_rate*_kwhST+(_prorateA*_kwhST*_AFARateA)+(_prorateB*_kwhST*_AFARateB)+_kapasiti*_kwhST+_rangkaian*_kwhST+IF(_kwh>600,_peruncitan,0)+_ICTST,

ROUND(_rate*_kwhNoST + _rate*_kwhST,2)
+ ROUND(IF(_kwh>600,(_prorateA*_kwhNoST*_AFARateA)+(_prorateA*_kwhST*_AFARateA),0),2)
+ ROUND(IF(_kwh>600,(_prorateB*_kwhNoST*_AFARateB)+(_prorateB*_kwhST*_AFARateB),0),2)
+ ROUND(_kapasiti*_kwhNoST+_kapasiti*_kwhST,2)
+ ROUND(_rangkaian*_kwhNoST+_rangkaian*_kwhST,2)
+ ROUND(IF(_kwh>600,_peruncitan,0),2)
+ ROUND(_ICTNoST+_ICTST,2)
+ ROUND(IF(_kwh>600,_sst*_subTotalkwhST,0),2)
+ ROUND(IF(_kwh>300,_kwtbb*(_subTotalKBB),0),2)
)


Later upload Excel file.
*
I think Tnb calculator is already comprehensive. It’s available at their website.

It includes the start and end date like yours too.

This post has been edited by bee88: Sep 5 2025, 07:49 AM
mcchin
post Sep 5 2025, 08:58 AM

SLAVA UKRAINI !
*******
Senior Member
3,902 posts

Joined: Jul 2005
From: Sin Lor, B'worth,Pg.
QUOTE(bee88 @ Sep 5 2025, 07:48 AM)
I think Tnb calculator is already comprehensive. It’s available at their website.

It includes the start and end date like yours too.
*
Means you never use the TNB calc more than once

The point of excel here is to have everything shown upfront

TNB own calculator, unless changed, need you to key in and select things again for everytime you want to change a single parameter


TSsoonwai
post Sep 5 2025, 05:44 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(bee88 @ Sep 5 2025, 07:48 AM)
I think Tnb calculator is already comprehensive. It’s available at their website.

It includes the start and end date like yours too.
*
Yes, indeed. In fact I used it to double check my Excel before I got the bill and also I wanted something that can display results in a few rows at the same time.

In addition, after I got the official PDF bill, I noticed that the TNB web calc is off for 1 sen for the really simple calcs (a x b) like kapasiti and rangkaian. PDF bill, mcchin's Google Sheet and mine all give the same result. Only explanation I can think of is that the web calculator truncates instead of rounding those calcs.
TSsoonwai
post Sep 10 2025, 11:49 AM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


20250910_1147:
• Uploaded Excel file to 1st post. The single cell formulas are on the Tariff sheet.
• Now includes formulas for old, non-ToU & ToU.
Optizorb
post Sep 10 2025, 08:57 PM

Regular
******
Senior Member
1,244 posts

Joined: Sep 2021
can make a How to guide for dummies?

I know where to download the daily usage data from mytnb..

but where do i input all those data in the excel?
TSsoonwai
post Sep 10 2025, 09:27 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(Optizorb @ Sep 10 2025, 08:57 PM)
can make a How to guide for dummies?

I know where to download the daily usage data from mytnb..

but where do i input all those data in the excel?
*
Quick reply first, later I'll update first post with better instructions.

Look in the "Table" sheet. There's a Table1 there already with some sample data. Delete those rows and paste yours from the csv.

The table expects Date , Time , Total_kWh.

The csv is "Datetime , Peak_kWh , OffPeak_kWh , Total_kWh" (if already on ToU) or "Datetime , kWh , Total_kWh" (if on non-ToU)

Open the csv and split the Datetime to "Date , Time" using Excel's Data -> Text-to-Columns and keep just the last Total_kWh.

After that can paste into that Table1 on the Table sheet.

*Can also use Excel's Power Query to import the csv. I just found out about this so haven't tried yet.

*Updated first post with guide. More or less. smile.gif

This post has been edited by soonwai: Sep 11 2025, 12:25 AM
TSsoonwai
post Sep 13 2025, 07:16 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


Updated Excel File in first post. It's so awesome now. not. biggrin.gif

20250913_1904
• Played around with the Stats & Forecast bit of the spreadsheet.
• Fix a bug with number of days calculation.
• Trying to fix up the graphs with better slicers.
• Cleaned up a bit. Still messy, sorry.

Victory!
Using the Forecast bit of the spreadsheet and checking and managing usage once a day. I managed to keep it below the target of 400 kWh for this month. The cool weather helped with decreased aircon usage for the last 9 days or so.

user posted image

This post has been edited by soonwai: Sep 13 2025, 07:28 PM
angelgemini
post Sep 15 2025, 05:51 PM

...
******
Senior Member
1,746 posts

Joined: Jun 2005
From: Malaysia


i have used some of your info in the excel to create 1 to check OP and P

from this can determine to use TOU or non TOU better.



This post has been edited by angelgemini: Sep 15 2025, 06:15 PM
nicklim17
post Sep 18 2025, 12:09 PM

Getting Started
**
Junior Member
258 posts

Joined: Feb 2008
From: Kedah



DOWNLOADED AND THANKS. NEED TIME TO EXPLORE.

Just wondering worth to apply TOU if past 6 month bill like this.

aircond mayb everynight 9+ to 11+. drum Washing machine mayb evening or morning,. shower heater as usual timing.

apr-64.7
may-85.85
jun-105
jul-67.15
aug-63.4
sep-72.95

brandonkl
post Sep 18 2025, 12:31 PM

-
*****
Junior Member
989 posts

Joined: May 2013
From: Kuala Lumpur


I just received my first full bill after converted to ToU in early August.

I think non-ToU is better for me.

July 2025 (Non-ToU) : 376 kWh used - RM 89.75
September (ToU) : 362 kWh used - RM 95.15

I will monitor for October. If it's the same as September, will switch back to non-ToU

LaiN87
post Sep 18 2025, 01:02 PM

Nom nom nom...
******
Senior Member
1,318 posts

Joined: Jan 2003
From: メラカ /b/PowerLvl:Over9000!


QUOTE(brandonkl @ Sep 18 2025, 12:31 PM)
I just received my first full bill after converted to ToU in early August.

I think non-ToU is better for me.

July 2025 (Non-ToU) : 376 kWh used - RM 89.75
September (ToU) : 362 kWh used - RM 95.15

I will monitor for October. If it's the same as September, will switch back to non-ToU
*
You took July bill which is combination of old tariff and new tariff. That’s not accurate.

Quick check new tariff non tou with 362kWh can already see you saved rm5. Do easy why not compare non tou new tariff calculator instead of comparing with old tariff / other months.
TSsoonwai
post Sep 18 2025, 10:12 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(nicklim17 @ Sep 18 2025, 12:09 PM)
DOWNLOADED AND THANKS. NEED TIME TO EXPLORE.

Just wondering worth to apply TOU if past 6 month bill like this.

aircond mayb everynight 9+ to 11+.  drum Washing machine mayb evening or morning,. shower heater as usual timing.

apr-64.7
may-85.85
jun-105
jul-67.15
aug-63.4
sep-72.95
*
I used 306kWh as an example for non-ToU RM72.84 (couldn't get to exactly RM72.95.) Since your usage quite similar to mine so I used 18% peak. Of course, better if you can find out your own peak % from the data at myTNB web. Then just plug in the numbers into the Excel spreadsheet and compare ToU to non.
user posted image
Save a bit lah. Of course, the more you spend, the more you save. sweat.gif

Also, since you are only 6kWh away from 300kWh, try to get it there. More savings because of higher ICT discount at 300kWh and below. Saving 6kWh over 31 days shouldn't be too difficult. I think you already managed that in August. 289kWh in Aug?

This post has been edited by soonwai: Sep 18 2025, 10:44 PM
TSsoonwai
post Sep 18 2025, 11:13 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(brandonkl @ Sep 18 2025, 12:31 PM)
I just received my first full bill after converted to ToU in early August.

I think non-ToU is better for me.

July 2025 (Non-ToU) : 376 kWh used - RM 89.75
September (ToU) : 362 kWh used - RM 95.15

I will monitor for October. If it's the same as September, will switch back to non-ToU
*
As LaiN87 said, Jun/July bill not good to compare with because of old/new tariff transition. It's probably be cheaper than normal if the transition happened right in the middle of your billing period.

Aug/Sep also no good if this is your non-ToU/ToU transition bill. Unless you timed the transition date to day 29 of your billing period, it will be more expensive than normal because all your kWh will kena 8% SST.
brandonkl
post Sep 18 2025, 11:17 PM

-
*****
Junior Member
989 posts

Joined: May 2013
From: Kuala Lumpur


QUOTE(LaiN87 @ Sep 18 2025, 01:02 PM)
You took July bill which is combination of old tariff and new tariff. That’s not accurate.

Quick check new tariff non tou with 362kWh can already see you saved rm5. Do easy why not compare non tou new tariff calculator instead of comparing with old tariff / other months.
*
Yeah I forgot new tariff was effective 1 July 2025.
brandonkl
post Sep 18 2025, 11:17 PM

-
*****
Junior Member
989 posts

Joined: May 2013
From: Kuala Lumpur


QUOTE(soonwai @ Sep 18 2025, 11:13 PM)
As LaiN87 said, Jun/July bill not good to compare with because of old/new tariff transition. It's probably be cheaper than normal if the transition happened right in the middle of your billing period.

Aug/Sep also no good if this is your non-ToU/ToU transition bill. Unless you timed the transition date to day 29 of your billing period, it will be more expensive than normal because all your kWh will kena 8% SST.
*
Yeah forgot about the new tariff on 1 July 2025.
TSsoonwai
post Sep 21 2025, 02:21 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


Is mytnb website kaput for everyone?

• Can't switch to other accounts.
• Account list empty
• Energy Usage dashboard gone
• Application Status empty

I guess their maintenance ending at 4pm yesterday didn't go so well.

App still working.

Slowly coming back.
20250921_1606
• Can't switch to other accounts✅
• Account list empty✅


This post has been edited by soonwai: Sep 21 2025, 04:06 PM
TSsoonwai
post Sep 25 2025, 12:11 AM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


Energy Dashboard is back!

user posted image

4 days MC didn't help at all.

This post has been edited by soonwai: Sep 25 2025, 01:16 AM
coolguy_0925
post Sep 25 2025, 08:46 PM

Look at all my stars!!
*******
Senior Member
4,535 posts

Joined: Jan 2003
QUOTE(soonwai @ Sep 25 2025, 12:11 AM)
Energy Dashboard is back!

4 days MC didn't help at all.
*
MC couldn't solve

This one need surgery & hospitalisation leave

Still need few clicks & crashes until you get what you want
kk131
post Sep 27 2025, 11:21 AM

On my way
****
Junior Member
566 posts

Joined: Jun 2005
From: Somewhere over the rainbow


QUOTE(coolguy_0925 @ Sep 25 2025, 08:46 PM)
MC couldn't solve

This one need surgery & hospitalisation leave

Still need few clicks & crashes until you get what you want
*
When I try to use it, it needs life support and resuscitation.
TSsoonwai
post Sep 28 2025, 10:41 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


October AFA published. Much higher discount than forecast. -6.5 sen/kWh.

This post has been edited by soonwai: Sep 28 2025, 10:47 PM
eyesee
post Oct 3 2025, 05:30 PM

Getting Started
**
Junior Member
186 posts

Joined: Jan 2009
QUOTE(soonwai @ Sep 28 2025, 10:41 PM)
October AFA published. Much higher discount than forecast. -6.5 sen/kWh.
*
Such high AFA rebate/discount is becoming unfair to those who are exempted from AFA.
To be fair, AFA rebate above a certain amount should be applied to ALL as this is due to lower fuel cost.

This post has been edited by eyesee: Oct 3 2025, 05:31 PM
TSsoonwai
post Oct 3 2025, 09:30 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(eyesee @ Oct 3 2025, 05:30 PM)
Such high AFA rebate/discount is becoming unfair to those who are exempted from AFA.
To be fair, AFA rebate above a certain amount should be applied to ALL as this is due to lower fuel cost.
*
It's ok lah. Now -0.065, next time +0.065, will even out to 0.
eyesee
post Oct 4 2025, 02:44 PM

Getting Started
**
Junior Member
186 posts

Joined: Jan 2009
QUOTE(soonwai @ Oct 3 2025, 09:30 PM)
It's ok lah. Now -0.065, next time +0.065, will even out to 0.
*
I suppose it is ok if it is once a while the rebate is this high. If it iremains at this level or more for a few months, then those using 500-600kwh would feel "cheated" the most

They want to shield these low usage people from rising fuel cost but don't give them discount when they have lower fuel cost. What a contradiction..
TSsoonwai
post Oct 11 2025, 05:28 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


So this month, I go micro manage the whole house punya TNB usage.

user posted image
2 more days to go. TNB bill forecast for this month: just above RM72.73

Always-on culprits.
1. SK Magic Water purifier Cold Water Tank
2. Ancient Aego M 2.1 speakers.
3. Back lane and front porch lights. Will probably have to live with this.
4. TPLink UH720 Powered USB hub

This post has been edited by soonwai: Oct 11 2025, 05:46 PM
zellleonhart
post Oct 12 2025, 12:05 AM

Stars stars stars
*******
Senior Member
5,075 posts

Joined: Oct 2008


Didn't know got someone did similar excel like me. Mine not as canggih but just for me to do rough estimation.

The energy dashboard web app is the worst shit ever. Most of the time it just keep spinning or redirecting to itself in an infinite loop. There's no reliable way to get the csv?
TSsoonwai
post Oct 12 2025, 12:23 AM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(zellleonhart @ Oct 12 2025, 12:05 AM)
Didn't know got someone did similar excel like me. Mine not as canggih but just for me to do rough estimation.

The energy dashboard web app is the worst shit ever. Most of the time it just keep spinning or redirecting to itself in an infinite loop. There's no reliable way to get the csv?
*
Perseverance was my only answer.

Worst ever indeed. Sometimes just to get the yesterday's daily usage.csv takes me like 15 mins of retrying.

Tonight specifically energy dashboard maintenance, for better or for worse. *sigh*

But eventually I managed download all available daily data. Oldest I could get was 31/7/2023.

user posted image
Smart meter was installed Nov 2020.

user posted image
Of course, need to graph it. sweat.gif

This post has been edited by soonwai: Oct 12 2025, 12:33 AM
coolguy_0925
post Oct 12 2025, 12:39 AM

Look at all my stars!!
*******
Senior Member
4,535 posts

Joined: Jan 2003
again, it is down for maint until 0300
kk131
post Oct 12 2025, 08:12 AM

On my way
****
Junior Member
566 posts

Joined: Jun 2005
From: Somewhere over the rainbow


QUOTE(zellleonhart @ Oct 12 2025, 12:05 AM)
Didn't know got someone did similar excel like me. Mine not as canggih but just for me to do rough estimation.

The energy dashboard web app is the worst shit ever. Most of the time it just keep spinning or redirecting to itself in an infinite loop. There's no reliable way to get the csv?
*
I had a better experience downloading the csv's early in the morning.
netflix2019
post Oct 12 2025, 11:44 AM

Casual
***
Junior Member
411 posts

Joined: Jun 2022
QUOTE(soonwai @ Oct 11 2025, 05:28 PM)
So this month, I go micro manage the whole house punya TNB usage.

user posted image
2 more days to go. TNB bill forecast for this month: just above RM72.73

Always-on culprits.
1. SK Magic Water purifier Cold Water Tank
2. Ancient Aego M 2.1 speakers.
3. Back lane and front porch lights. Will probably have to live with this.
4. TPLink UH720 Powered USB hub
*
Wah aegoM 2.1 kaki. Cheers.

Consume so much letrik? I have 2 in my house somemore.
TSsoonwai
post Oct 30 2025, 02:05 PM


********
All Stars
11,450 posts

Joined: Oct 2007
From: KL


QUOTE(netflix2019 @ Oct 12 2025, 11:44 AM)
Wah aegoM 2.1 kaki. Cheers.

Consume so much letrik? I have 2 in my house somemore.
*
Awesome speakers. I got 2 white ones and a black one but now only left one pair still in use. I just use basic watt meter at wall socket, the Aego macam no standby mode, consuming 15-20W even when not in use.
netflix2019
post Oct 30 2025, 02:17 PM

Casual
***
Junior Member
411 posts

Joined: Jun 2022
QUOTE(soonwai @ Oct 30 2025, 02:05 PM)
Awesome speakers. I got 2 white ones and a black one but now only left one pair still in use. I just use basic watt meter at wall socket, the Aego macam no standby mode, consuming 15-20W even when not in use.
*
start with 1 set. then someone posted in garage sale selling satellite speaker rm50 cos woofer rosak liao. Bought both the satelite speaker rm100.

Then found someone selling their 2.1 set rm400 i think. A vietnamese in MMU cyberjaya packing preparing to leave Malaysia.

So now got two set with 3 satellite each. 1 for tv 1 for my PC. I hook them both to amplifier somemore, no rosak. crazy durable.

 

Change to:
| Lo-Fi Version
0.0167sec    0.55    6 queries    GZIP Disabled
Time is now: 25th November 2025 - 07:04 PM