Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default RIGHT_worksheet_function question

Hello -

I have an Excel spreadsheet that has 2 columns with many rows of
numeric data in them. The cells have been defined as text fields.

The problem I am having is I need to see if there is a way to express
the RIGHT_worksheet_function with some sort of dynamic variable. I
have a 5 digit number in many different rows of a particular column,
and need to remove the first 2 numbers in it so that the last 3 numbers
are all that is left in the field. The problem I am having is trying
to figure out how to do this without having to manually do it.

For example I have:

A B
19 19010
20 20010
21 21010
***NOTE*** Column A is already defined and only being used for example
purposes.

And so on...

Is there any way to make the expression work for column B without
having to change the expression's first 2 digits every time that
changes? Right now I have only been able to get "=RIGHT(19010,3)" to
work, but this will not longer work once the first 2 digits change in
the number. I need to figure out if there is a way to make this
formula dynamic for varying numbers.

The end result needs to be:

A B
19 010
20 010
21 010
***NOTE*** Column A is already defined and only being used for example
purposes.

Much thanks in advance...

  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

First on column C type
=right(b1,len(a1))
Then copy paste special values and Ok will remove the formulas
Now you can cut and paste it over column B

However If the exact numbers on column A need to be replaced in column B
for instance in the example provided column A first row =19 and
corresponding value in column B also begins with 19 then
on column C type
=substitute(b1,a1,"")


wrote in message
oups.com...
Hello -

I have an Excel spreadsheet that has 2 columns with many rows of
numeric data in them. The cells have been defined as text fields.

The problem I am having is I need to see if there is a way to express
the RIGHT_worksheet_function with some sort of dynamic variable. I
have a 5 digit number in many different rows of a particular column,
and need to remove the first 2 numbers in it so that the last 3 numbers
are all that is left in the field. The problem I am having is trying
to figure out how to do this without having to manually do it.

For example I have:

A B
19 19010
20 20010
21 21010
***NOTE*** Column A is already defined and only being used for example
purposes.

And so on...

Is there any way to make the expression work for column B without
having to change the expression's first 2 digits every time that
changes? Right now I have only been able to get "=RIGHT(19010,3)" to
work, but this will not longer work once the first 2 digits change in
the number. I need to figure out if there is a way to make this
formula dynamic for varying numbers.

The end result needs to be:

A B
19 010
20 010
21 010
***NOTE*** Column A is already defined and only being used for example
purposes.

Much thanks in advance...



  #3   Report Post  
 
Posts: n/a
Default

I obviously have scrambled brains today...My apologies, but I need the
last 3 numbers of any given 5 digit number using the
RIGHT_worksheet_function and this will not work with the numbers always
being different. Sorry for the confusion...I've been working with both
the LEFT and RIGHT expressions today and obviously was mixed up...


Thanks again, and any help would be much appreciated...

  #4   Report Post  
 
Posts: n/a
Default

The first formula "RIGHT=(B#,len(A#)) almost has it. It only grabs the
last 2 digits of my 5 digit number though.

  #5   Report Post  
 
Posts: n/a
Default

I got it! Here is what it took...

RIGHT=(B393,3)


This gave me the last 3 digits doing this from Column C. Thank you
very much for the info!



  #6   Report Post  
Bernard Liengme
 
Posts: n/a
Default

Have I really misunderstood your question?
=RIGHT(A1,3) will give 345 if A1 hold 12345 but it will be text\
=VALUE(RIGHT(A1,3)) will give 345 as number.
But so will =MOD(A1,1000)
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

wrote in message
oups.com...
I obviously have scrambled brains today...My apologies, but I need the
last 3 numbers of any given 5 digit number using the
RIGHT_worksheet_function and this will not work with the numbers always
being different. Sorry for the confusion...I've been working with both
the LEFT and RIGHT expressions today and obviously was mixed up...


Thanks again, and any help would be much appreciated...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Simple question Sheila Clarke Excel Discussion (Misc queries) 2 March 24th 05 04:31 PM
Question about combining data from multiple workbooks into one rep BookOpenandUpright Excel Discussion (Misc queries) 2 February 19th 05 12:37 PM
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM
COUNTIF Question zbert Excel Worksheet Functions 1 November 1st 04 01:59 AM


All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"