$ amount does not calculate with a space

FXA

Board Regular
Joined
Jan 28, 2023
Messages
71
Office Version
  1. 365
Platform
  1. Windows
My issue is when I copy and paste from my source, that source has no comma in the dollar amount when the dollar amount hits the thousands and above. Is there a way around this?

Formula:

=C5+AK8+AK9+AK10

C5 = Starting Balance

AK8 =SUM(N10:N1809)

AK9 =SUM(L10:L1809)

AK10 =SUM(M10:M1809)


Thank you in advance.
 

Attachments

  • EXCEL_CFmI00cvDJ.png
    EXCEL_CFmI00cvDJ.png
    59.1 KB · Views: 31

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Just put the code in in the worksheet module (I've reduced it to just the bits you need [especially removed the FormulaVersion:=xlReplaceFormula2 as it won't run if your user has an older version of Excel])

VBA Code:
Private Sub Worksheet_Activate()
Columns("N:N").Replace What:=" ", Replacement:="", LookAt:=xlPart
End Sub
Quick question:

What if I need to run that across multiple Columns?
 
Upvote 0
If it is just a few columns just repeat the code just changing the column letters or post the columns that you want
 
Upvote 0
VBA Code:
Range("L:M").Replace What:=" ", Replacement:="", LookAt:=xlPart
 
Upvote 0
Obviously if you still require it to work on column N as well just change the M in the last post to N so the one line covers all the columns
 
  • Like
Reactions: FXA
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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