Moideen wrote
Auric__ said:
Moideen wrote
-
We are Maintaining cost in English Letters, Kindly Help to get COS
on Coloumn
Examples
A :
B :
C :
D :
F :
If I Entered 242 on Coloumn1 Need Automatic Shown BDB on Coloumn2-
Put this in the sheet's object in the VBA editor:- [snip]-
Edit the 'costs' array to fit. (The hashes are there to indicate dat
entry errors. If you don't want them, don't delete them -- chang the
to "".)
If this is meant to apply to the entire workbook, put this in the
ThisWorkbook object instead:-
[snip]
Thank you very much, This function working is smoothly but on problem
If i entered 12.3 , Need Letter : AB.C or AB/C Please Help me.
I looked through the functions, and found the SUBSTITUTE spreadsheet
function. It should be faster than my code, and should also be easier t
understand. Paste this into B1 and then copy down (one line, watch th
word
wrap)
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUT
(A1,1,"A"),2,"B"),3,"C"),4,"D"),5,"F"
This can be extended by adding on more levels of SUBSTITUTE i
necessary
If you'd rather stick with VBA, this works similarly
Private Sub Worksheet_Change(ByVal Target As Range
For Each cell In Targe
If cell.Column = 1 Then cell.Offset(0, 1).Value = Replace(Replace
Replace(Replace(Replace(cell.Value, 1, "A"), 2, "B"), 3, "C")
4, "D"), 5, "F"
Nex
End Su
(Forget about what I posted before. Wasted effort on my part, mostly.