Google Sheets RIGHTB Function

This post will guide you how to use Google Sheets RIGHTB function with syntax and examples.

Description


The Google Sheets RIGHTB function returns a substring (a specified number of the bytes) from a text string, starting from the right portion.

The RIGHTB function can be used to extract the right portion of a string up to a certain number of bytes in google sheets.

The RIGHTB function is a build-in function in Google Sheets and it is categorized as a Text Function.

Syntax


The syntax of the RIGHTB function is as below:

= RIGHTB(text,[num_of_bytes])

Where the RIGHTB function arguments are:

  • Text -This is a required argument. The text string that you want to extract from.
  • num_of_bytes -This is an optional argument. It will specify the number of bytes that you want to extract from Text string.

Note: 

  • The num_of_bytes value must be greater than or equal to zero. If num_of_bytesvalue is greater that the length of text string, it will return all of text string. If num_of_bytes value is omitted, it is set to be 1 by default.
  • If Num_bytes equal to 0, it will cause RIGHTB function to extract the empty string.
  • If text string has only single bytes characters and the RIGHTB function returns the same value as RIGHTB function.

Google Sheets RIGHTB Function Examples


The below examples will show you how to use google sheets RIGHTB function to extract the rightmost substring from a text string.

#1 To extract the rightmost 4 bytes in the B1 cell, just using formula:

= RIGHTB(B1,4) //it returns “ogle”

google sheets rightb function

#2 If you do not provide num_of_bytes argument, it will use the default value as 1, using the following formula:

= RIGHTB ("google") //it returns “e”

google sheets rightb function

#3 If Num_chars exceeds the text string length, the RIGHTB function will return the entire string:

= RIGHTB ("google",200)  //it returns “google”

google sheets rightb function

#4 If Text value is a numeric value, and the RIGHTB function will return a text value:

= RIGHTB (1234,2) //it returns “34”

google sheets rightb function

Note:

You can use the LEFTB function to extract substring from the left side of a text string in Google Sheets. And you can also use another function called RIGHTB function to extract a substring starting from the right side of the text string. And if you wish to extract a substring starting from the middle position of text string, you can use the MIDB function.

 

 

 

 

Related Posts

Google Sheets TODAY Function
google sheets today function

This post will guide you how to use Google Sheets TODAY function with syntax and examples. Description The Google Sheets TODAY function get the current date as a date value. And it will be updated each time when your worksheet ...

Google Sheets TIME Function
google sheets time function1

This post will guide you how to use Google Sheets TIME function with syntax and examples. Description The Google Sheets TIME function converts an hour, minute and second into a time. The TIME function can be used to create a ...

Google Sheets SECOND Function
google sheets second function1

This post will guide you how to use Google Sheets SECOND function with syntax and examples. Description The Google Sheets SECOND function returns the seconds of a time value. Or returns an integer value that represent the second component of ...

Google Sheets NOW Function
google sheets now function1

This post will guide you how to use Google Sheets NOW function with syntax and examples. Description The Google Sheets NOW function returns the serial number of the current date and time. And it will be updated each time when ...

Google Sheets NETWORKDAYS.INTL Function
google sheets networkdays.intl function1

This post will guide you how to use Google Sheets NETWORKDAYS.INTL function with syntax and examples. Description The Google Sheets NETWORKDAYS.INTL function returns the number of net working days between tow given days excluding specified weekend days and holidays. The ...

Google Sheets NETWORKDAYS Function
google sheets networkdays function1

This post will guide you how to use Google Sheets NETWORKDAYS function with syntax and examples. Description The Google Sheets NETWORKDAYS function returns the number of net working days between tow given days. The NETWORKDAYS function can be used to ...

Google Sheets MONTH Function
google sheets month function1

This post will guide you how to use Google Sheets MONTH function with syntax and examples. Description The Google Sheets MONTH function returns the month of a date represented by a serial number. And the month is an integer number ...

Google Sheets MINUTE Function
google sheets minute function1

This post will guide you how to use Google Sheets MINUTE function with syntax and examples. Description The Google Sheets MINUTE returns the minutes of a time value. And the minutes is an integer number from 0 to 59. So ...

Google Sheets ISOWEEKNUM Function
google sheets isoweeknum function1

This post will guide you how to use Google Sheets ISOWEEKNUM function with syntax and examples. Description The Google Sheets ISOWEEKNUM returns the number of the ISO week of the year for a given date. ISO weeks begin on Monday ...

Google Sheets HOUR Function
google sheets hour function1

This post will guide you how to use Google Sheets HOUR function with syntax and examples. Description The Google Sheets HOUR returns the hour of a time value. Or returns an integer value that represent the hour component of a ...

Sidebar