ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   RIGHT function not working (https://www.excelbanter.com/excel-discussion-misc-queries/187284-right-function-not-working.html)

jase

RIGHT function not working
 
I am trying to use thr ight function but it's not giving me the correct
feedback. In my cell it says "time of day" so I enter this code to look up
just "day" it outputs "time of day"

Sheets("Basis").Range(Right("B42", 3)).Value

any ideas?

thanks,

Jase

bpeltzer

RIGHT function not working
 
Working from inside out, Right("B42",3) is B42. So Range("B42").Value is
"time of day". You want to apply Right to the value, not the cell address:
RIgnt(Sheets("Basis").Range("B42").Value,3)

"Jase" wrote:

I am trying to use thr ight function but it's not giving me the correct
feedback. In my cell it says "time of day" so I enter this code to look up
just "day" it outputs "time of day"

Sheets("Basis").Range(Right("B42", 3)).Value

any ideas?

thanks,

Jase



All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com