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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
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,221,532
Messages
6,160,380
Members
451,643
Latest member
nachohoyu

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