Google sheets में IF then function का उपयोग कैसे करें | Google Sheet Explained

यह article इस बारे में है कि कैसे “Google sheets में IF then function का उपयोग कैसे करें”| अगर आपको लेख पसंद आया हो तो कृपया इसे दूसरों के साथ share करें|

Introduction:

Google Sheet “IF THEN” फ़ंक्शन का सूत्र::

  • IF (test, value_if_true, value_if_false)
google sheet if else then function
Google sheet if function.

If Else कंडीशनल स्टेटमेंट्स बहुत ही महत्वपूर्ण हैं अगर हम कोई कंडीशन किसी कॉलम पे चेक करके एक नया कॉलम बनाना चाहते हैं तो, जैसे की:

  • Values in column A is greater than 20 or not,
  • Length of text in column A is greater than 10 or not,
  • Country in column A is India or not etc.

तो ऊपर दिए गए उदाहरण में पहले के तुलना एक नया कॉलम add हो जाएगा फाइनल डेटा टेबल में आपकी कंडीशन की बेसिस पे|

इसे करने के दो तारीके हो सकते हैं जैसे कि पहले ये काम मैन्युअल रूप से किया जाता होगा, लेकिन इस फंक्शन के आने के बाद ये काम ऑटोमेटेड तरीके से किया जाने लगा, जिस्की वजह से काम seconds में होने लगा। .

तोह If Else स्टेटमेंट SQL, python और aisi अन्य कोडिंग लैंग्वेज में भी उपयोग होता है|

इसके अलावा, ये कोई नया फंक्शन नहीं है ये काफ़ी टाइम से गूगल शीट, एक्सेल आदि में इस्तेमाल किया जा रहा है|

Is there an IF ELSE function in Google Sheets?

Google sheets do have an IF ELSE function which anyone can apply on any cell to check a certain condition and get that condition based output in the cell.

E.g. =IF(A2<0, ‘negative’, ‘positive’)

So, output of above statement will be negative if value in cell A2 is less than 0 or positive if value is greater than or equal to 0.

So, the benefit of using this function is creating a column that gives output based on a certain condition that is met on another cell.

If you don’t know this function then maybe you end up doing the manual tagging if required or you have to use a certain coding language to create a column that gives output based on a condition that is met on another cell.

What are the 3 arguments of the IF function?

Syntax of IF function in Google Sheets is as mentioned below:

  • IF(logical_expression, value_if_true, value_if_false)

So, from the above syntax or formula you can see there are three arguments inside an IF function i.e.

  1. logical_Expression e.g.
    1. a > b or a = b or a > b
    2. len(a) > 5
    3. A >= 0 etc.
  2. Value_if_true i.e. output value that the above formula will print in cell if the condition or logical_expression stands true.
  3. Value_if_false is the output value that the function will print if the logical expression fails or condition is not true.

Be careful while applying this formula as a simple mistake can lead to errors like 

  • You forgot to include a comma while writing the formula, 
  • If you are matching string with numeric value etc. then in those cases your formula will not work, or
  • Formula used inside the IF function is not correct. For example while writing a length function you made some spelling mistake then in such cases your function will not work properly and it will start throwing errors.

So, be aware of the cases mentioned above. But, apart from everything IF is a very powerful and good function for giving logical outputs in Google Sheets or Excel.

How do you write an IF THEN formula?

The Google Sheets IF-THEN has 3 arguments, this is the basic syntax of it viz. =IF(logic test,value if true,value if false). So, first argument is the logical tests that tests a condition like whether a number is greater than or less than or equal to a certain value. Second argument is the output the function should return if logic statement is True and the third or last argument is the output the function should return if logic statement is False.

E.g. =IF(A1>10, ‘high’, ‘low’)
So, output of above statement will be high if value in cell A1 is greater than 10 or low if value is less than or equal to 10.

Is there an IF ELSE function in Google Sheets?

हम IF THEN का उपयोग क्यों करते हैं:

  • एक मान लौटाता है यदि एक logical expression `TRUE` है और दूसरा अगर यह `FALSE` है| उदाहरण
    • यदि आप किसी कॉलम में यह जांचना चाहते हैं कि कोई मान किसी विशेष मान से बड़ा है या कम है, जैसे IF(B2 > 30,’>30′, ‘<=30’)
      • तो, उपरोक्त मामले में यदि B2 सेल में मान 30 से अधिक है तो यह ‘>30’ प्रिंट करेगा अन्यथा यह उस सेल में ‘<=30’ प्रिंट करेगा|
      • सूत्र को पूरे सेल में भी बढ़ाया जा सकता है “CNTRL + D” कमांड का उपयोग करके|
google sheet if else function
Google Sheet If Else Statement.

तो आप देख सकते हैं की कैसे आप ये चेक कर सकते हैं कि एक कॉलम की वैल्यू 30 से अधिक है की नहीं।और उसके आधार पे एक नए कॉलम में कस्टम टेक्स्ट प्रिंट करा सकते हैं, जैसे की हमने किया है ऊपर वाले उदाहरण में।

टेक्स्ट मानों की जाँच करें उदाहरण | Check Text Values using If Else Statement

नीचे, दो उदाहरण दिए गए हैं जिनमें हम जाँच कर रहे हैं

ए. यदि कुछ टेक्स्ट मान से सटीक मिलान होता है,

ब. यदि सेल में मौजूद टेक्स्ट की लंबाई 4 से अधिक या उसके बराबर है या नहीं, यदि हाँ, तो सूत्र TRUE वापस करेगा नहीं तो FALSE|

google sheet if else function for text data
  • IF and IF-ELSE के बीच अंतर:
    • IF और ELSE IF के बीच का अंतर यह है कि आप IF ब्लॉक का उपयोग केवल एक बार या एक वाक्य में एक बार के लिए कर सकते हैं|
    • ELSE IF को कई बार पूरी तरह से इस्तेमाल किया जा सकता है|

Source: askanydifference.com

Nested if statements | formula multiple conditions example:

नीचे दिए गए उदाहरण की मदद से आप समझ सकते हैं की कई शर्त के साथ इस समारोह को कैसे लागू करें

google sheet if else nested formula

5 वास्तविक अनुप्रयोग if-else फ़ंक्शन के in Google Sheets:

  • छात्रों की पास-फेल रिपोर्ट बनाने में जैसे IF(B2 > 30, ‘Pass’, ‘Fail’)
  • ऑर्डर डिलीवरी रिपोर्ट बनाने के लिए जैसे IF(B2 = ‘Delivered’, ‘Delivered’, ‘Pending’)
  • किसी विशेष संख्या से अधिक या कम मानों की जाँच करें|
  • जांचें कि सेल में टेक्स्ट की लंबाई किसी विशेष वर्ण सीमा से अधिक या कम है|
  • नेस्टेड फ़ंक्शंस का उपयोग करके हम कस्टम मान भी प्रिंट कर सकते हैं|

SQL Case When Function:

  • Case When स्टेटमेंट SQL: SQL में हमारे पास CASE WHEN स्टेटमेंट होता है मल्टी कंडीशन के लिए| उदाहरण
Case 
    when a1 > 30 then 'Greater than 30'
    when a1 > 15 and a1 <=30 then '15-30'
else 'Other' end

Python IF-ELSE Function:

  • नीचे दिए गए कोड ये लागू कर सकते हैं python में:
value = 9.7

if value > 9:
	print("Value is greater than 9.")
else:
	print("Value is less than 9.")

प्रासंगिक लिंक:

पढ़ने के लिए अन्य लेख:

मुझे आशा है कि आपको यह लेख “Google sheets में IF then function का उपयोग कैसे करें” पसंद आया हो, यदि आपको अभी भी कोई संदेह है, तो कृपया बेझिझक हमें comments में बताएं और यदि आपको लेख “Google sheets में IF then function का उपयोग कैसे करें” पसंद आया है तो कृपया हमें बताएं कि आप और किस बारे में पढ़ना चाहते हैं|

बारंबार पूछे जाने वाले प्रश्न:

Q. क्या Google Sheet में “IF THEN” जैसा कोई फंक्शन है?

Ans. हां, इस लेख में ये ही समझाने का प्रयास किया है|

Q. क्या “IF THEN” फ़ंक्शन को कई शर्तों के साथ लागू किया जा सकता है?

Ans. हां, इसमे आप एक से ज्यादा शर्तें लगा के भी लागू कर सकते हैं| Nested If statments वाले सेक्शन में आप देख सकते हैं, कैसे मल्टीपल IF स्टेटमेंट्स का उपयोग करके जटिल स्थितियां भी लागू कर सकते हैं|

8 thoughts on “Google sheets में IF then function का उपयोग कैसे करें | Google Sheet Explained”

Leave a Comment