Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using a macro to validate a form. I would like cell A1 to equate to the
last four charecters of cell a4. For e.g if cell a1 is 552004k00 cell a4 should have the value 4k00. I would be grateful if you could provide this to me in VBA code. Thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200605/1 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Range("A1").Value = Right(Range("A4").Value,4)
-- HTH Bob Phillips (remove xxx from email address if mailing direct) "mohd21uk via OfficeKB.com" <u20517@uwe wrote in message news:60615dea026f3@uwe... I am using a macro to validate a form. I would like cell A1 to equate to the last four charecters of cell a4. For e.g if cell a1 is 552004k00 cell a4 should have the value 4k00. I would be grateful if you could provide this to me in VBA code. Thanks -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200605/1 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have tried this function but it still gives me errors. I get the E+15 error.
I am wondering how I can change this, Bob Phillips wrote: Range("A1").Value = Right(Range("A4").Value,4) I am using a macro to validate a form. I would like cell A1 to equate to the last four charecters of cell a4. For e.g if cell a1 is 552004k00 cell a4 should have the value 4k00. I would be grateful if you could provide this to me in VBA code. Thanks -- Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think it'll depend on what's in those last 4 characters.
with Range("A1") .numberformat = "@" 'make it text .Value = Right(Range("A4").Text,4) end with "mohd21uk via OfficeKB.com" wrote: I have tried this function but it still gives me errors. I get the E+15 error. I am wondering how I can change this, Bob Phillips wrote: Range("A1").Value = Right(Range("A4").Value,4) I am using a macro to validate a form. I would like cell A1 to equate to the last four charecters of cell a4. For e.g if cell a1 is 552004k00 cell a4 should have the value 4k00. I would be grateful if you could provide this to me in VBA code. Thanks -- Message posted via http://www.officekb.com -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
Number of characters in a cell (one row, merged columns) | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel | |||
Possible Lookup Table | Excel Worksheet Functions | |||
if cell starts with characters formula | Excel Discussion (Misc queries) |