• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

put decimal before second last number by vba in column E

Hi
Maro will be placed in macro.xlsm
Put decimal before second last number in column E of alert..xls by vba
so the reesult will be in column E is
1410.5
1510
Thnx
plz see the uploaded file
 

Attachments

  • Alert..xls
    25.5 KB · Views: 3
Leonardo1234
Did You test that file?
If You tested and You noticed that it works
... then there is a macro in that file.
If You have not found it
... then You should try to find it again ... again ... until You'll find it.
 
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 5 And Len(Target.Value) > 0 Then
        On Error Resume Next
        ASE False
        Target.Value = Target.Value / 100
        ASE True
    End If
End Sub

Sub ASE(ss)
    With Application
        .EnableEvents = ss
        .ScreenUpdating = ss
    End With
End Sub



U have mentioned this
Olz make it simple for me
like
Sub ASE(ss)
code
End Sub


like this Sir
 
Leonardo1234
Cannot You copy Yourself those lines as those are in my sample file to Your ... file ... which You have not given?
Different ... You have asked specific setting for that code and it should work as You have written.
What is Your challenge?
 
Leonardo1234
Please reread to refresh Your memory...
... that was a solution which You asked.

Of course that second code could include with the main code ... but ... this way is someway more clear.

And that other forum has also now different details about Your needs ...hmm?
 
I have followed the rules Sir
I cross posted this question
But I shared the link of each other in both the forums Sir
Sir I am looking for code that I will run & that thing will happen & with this macro that is not possible
So I thought to ask in another forums also
So I get the better Result for me
May I know Sir now which rules ,I unfollowed?
I will not repeat that mistake again
 
Leonardo1234
As I tried to wrote with my previous reply
And that other forum has also now different details about Your needs ...hmm?
Means ... if You think something and You write something else then ... You'll get something else than You have thought.
Base forum rules:
  • When drafting a question, try and lay out the question in a clear and concise way.
  • Try and tell the readers what is the situation, what have you tried and what do you want to achieve.
  • Don't leave out information more info is better
 
Sure from next time I will keep in mind that also
& I just copy pasted the question to other forum
I have not added any additional information to the question

But No Problem
From next time
I will provide all the info regarding the problems
& Sorry for the same
This will not be repeated in future
 
Leonardo1234
Your I have not added any additional information to the question
... then someone else has written those
Screenshot 2020-07-07 at 17.33.23.png
Just hint for You:
If You have plan to run 'macro' manually and
then You'll run it more than once ... then okay.
 
Problem Solved
Code:
Sub DivideBy100()
    Dim wbk As Workbook
    Dim wsh As Worksheet
    Dim m As Long
    Dim rng As Range
    Application.ScreenUpdating = False
    Set wbk = Workbooks.Open("Alert..xls") ' Add the path yourself
    Set wsh = wbk.Worksheets(1)
    m = wsh.Range("E" & wsh.Rows.Count).End(xlUp).Row
    For Each rng In wsh.Range("E1:E" & m)
        rng.Value = rng.Value / 100
    Next rng
    wbk.Close SaveChanges:=True
    Application.ScreenUpdating = True
End Sub
 
Leonardo1234
Okay ... You seems to read only one line....
Hint again - in the real World - there are many times something very important printed with very small text in the end of contract.
Those should read ... but ... not way! I do not use that!
 
Yes I read that hint too..
I will run the macro daily & manually by me
U said right
So anything if u wanted to say then pm me
By the hint given by you I understood only this much only
 
Back
Top