Excel MID Function

Excel MID Function

The MID function in Excel extracts a specific number of characters from a text string, starting at a specified position. Its useful for parsing text, extracting substrings, and cleaning data

Excel Mid Function

MID Function Syntax

=MID(text, start_num, num_chars)

text – The text string to extract from. 

start_num – The position where extraction begins (1st character = 1). 

num_chars – Number of characters to extract. 

Example

A3 = BLOG COMPUTER
=MID(A3,4,6)

Result:

G COMP

Example 2: Get Domain from Email

Extract "gmail.com" from "user@gmail.com":

=MID(A2, FIND("@", A2) + 1, LEN(A2)) 
  • FIND("@", A2) + 1 → Starts after "@".

  • LEN(A2) → Takes the remaining characters.


0 تعليقات

إرسال تعليق

Post a Comment (0)

أحدث أقدم