Excel Query

Excel_77

Active Member
Joined
Sep 15, 2016
Messages
311
Office Version
  1. 2019
Platform
  1. Windows
Hi All,

Below is an extract from a large file that I have. However, I have some problems with it:

1. I have added in the column "Total KWH" to add up the values of "UNR KWH" and "Day 1 KWH", however, I have an issue as some of the values appear to be minus with the - at the end (example 403.000-) so the formula does not pick this up, how can I address it?

2. I have to show the ID that has the highest kWh, how do I do this as some of the IDs have been duplicated?

Thanks in advance

1719393016795.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Assuming a value is in cell A1
Excel Formula:
=---SUBSTITUTE(A1,"-","")
 
Upvote 0
Assuming a value is in cell A1
Excel Formula:
=---SUBSTITUTE(A1,"-","")

Thanks, I have just realised that this type of minus after the figure appears everywhere within the document, it there a fast way to move it from the end to the beginning or is there a way for the formula to detect it at the end of the figure?
 
Upvote 0
You could check the last character, and if it's minus, the coercion formula is applied, otherwise original number is returned:
Excel Formula:
=IF(RIGHT(A1)="-",---SUBSTITUTE(A1,"-",""),A1)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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