+ Reply to Thread
Results 1 to 9 of 9

How to enter text with if condition

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    28

    How to enter text with if condition

    Sir,

    i attach a excel file in which i have column name subdiv_name at column F and i want to enter text automatically in corresponding column H where condition is if subdiv_name =H11 then fill the column against H11 with "division 1" or if subdiv_name = "h12" then "division 2" and so on i put it value manually in sheet please provide a formula for whole sheet to fill column

    thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: How to enter text with if condition

    G'day

    Try this

    Enter the formula in cell H2 then copy drag down.

    =IF(F2="H11","Division 1","Division 2")
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How to enter text with if condition

    thanks for your response but subdiv_name are more than two actullay then how to do it.

    thanks

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: How to enter text with if condition

    Create a small table with the correspondences between the values, then use VLOOKUP to retrieve them

  5. #5
    Registered User
    Join Date
    08-16-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How to enter text with if condition

    how to do it ? please help with example
    thanks

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to enter text with if condition

    hi tanmanoj. so what are the other names? you can place all of them somewhere say in L2:L10 like:
    H11
    H12
    H13
    ... and so on

    then in M2:M10
    Division 1
    Division 2
    Division 3
    ... and so on

    in H2:
    =VLOOKUP(F2,$L$2:$M$10,2,0)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  7. #7
    Registered User
    Join Date
    08-16-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: How to enter text with if condition

    Great, i done it with this formula.


    Please tell me what stands 2,0 in vlookup

    thanks

  8. #8
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to enter text with if condition

    2 is telling Excel you want the 2nd column from the table_array (where i selected $L$2:$M$10). 0 is equivalent to typing FALSE, and they both mean exact match for this formula.

    the other option to the last argument of VLOOKUP is to use 1, TRUE or omit the last argument. that is to find approximate match. it's not for this case you have.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: How to enter text with if condition

    Quote Originally Posted by tanmanoj View Post
    Great, i done it with this formula.


    Please tell me what stands 2,0 in vlookup

    thanks
    XL as a help function activated by hitting F1. You then can find explanation on function syntax or many other things. I will refrain from further comment, though...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. condition format :when enter word, symbol appear
    By choy96 in forum Excel General
    Replies: 1
    Last Post: 07-25-2013, 01:23 AM
  2. if condition to use the same formula with two cells and to enter text
    By kishoremcp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2012, 10:15 PM
  3. vba to enter text to col F condition on col E, C
    By ithus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2011, 03:41 AM
  4. Macro for enter a value based on some condition
    By Thamizh_k in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-06-2009, 08:55 AM
  5. Replies: 2
    Last Post: 08-03-2005, 09:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1