Hoppa till huvudinnehåll

Hur returnerar jag värde i en annan cell om en cell innehåller viss text i Excel?

Som exemplet visas nedan, när cell E6 innehåller värdet "Ja", kommer cell F6 automatiskt att fyllas i med värdet "godkänn". Om du ändrar "Ja" till "Nej" eller "Neutralitet" i E6 kommer värdet i F6 att ändras till "Neka" eller "Ompröva" omedelbart. Hur kan du göra för att uppnå det? Den här artikeln samlar några användbara metoder som hjälper dig att enkelt lösa det.


Returnera värde i en annan cell om en cell innehåller viss text med formel

För att returnera värde i en annan cell om en cell bara innehåller en specifik text, försök med följande formel. Till exempel, om B5 innehåller "Ja", returnera sedan "Godkänn" i D5, annars returnera "Nej kvalificera". Gör så här.

Välj D5 och kopiera formeln nedan till den och tryck på ange nyckel. Se skärmdump:

Formel: Returnera värde i en annan cell om en cell innehåller viss text

= OM (ISNUMBER (SÖK ("Ja",D5)), "Godkänn""Ingen kvalificering")

Anmärkningar:

1. I formeln, “Ja", D5, "godkänna"Och"Ingen kvalificering”Ange att om cell B5 innehåller texten” Ja ”, kommer den angivna cellen att fyllas med texten” godkänna ”, annars kommer den att fyllas med” Nej kvalificera ”. Du kan ändra dem baserat på dina behov.

2. För att returnera värde från andra celler (som K8 och K9) baserat på ett specificerat cellvärde, använd denna formel:

= OM (ISNUMBER (SÖK ("Ja",D5))K8,K9)

Markera enkelt hela rader eller hela rader i markeringen baserat på cellvärde i en viss kolumn:

Smakämnen Välj specifika celler nytta av Kutools för Excel kan hjälpa dig att snabbt välja hela rader eller hela rader i urvalet baserat på specifikt cellvärde i en viss kolumn i Excel.  Ladda ner hela funktionen 60-dagars gratis spår av Kutools för Excel nu!


Returnera värden i en annan cell om en cell innehåller olika texter med formel

Detta avsnitt kommer att visa formeln för att returnera värden i en annan cell om en cell innehåller annan text i Excel.

1. Du måste skapa en tabell med specifika värden och returvärden som finns separat i två kolumner. Se skärmdump:

2. Välj en tom cell för att returnera värdet, skriv in formeln nedan i den och tryck på ange för att få resultatet. Se skärmdump:

Formel: Returnera värden i en annan cell om en cell innehåller olika texter

= LETARAD (E6,B5: C7,2,FALSK)

Anmärkningar:

I formeln E6 är cellen innehåller det specifika värde du kommer att returnera värde baserat på, B5: C7 är kolumnområdet som innehåller de specifika värdena och returvärdena, 2 nummer betyder att returvärdena som ligger i den andra kolumnen i tabellintervallet.

Från och med nu, när värdet i E6 ändras till ett specifikt, kommer motsvarande värde att returneras i F6 omedelbart.


Returnera enkelt värden i en annan cell om en cell innehåller olika texter

Egentligen kan du lösa ovanstående problem på ett enklare sätt. De Leta efter ett värde i listan nytta av Kutools för Excel kan hjälpa dig att uppnå det med bara flera klick utan att komma ihåg formeln.

1. Samma som ovanstående metod, du måste också skapa en tabell med specifika värden och returvärden som placeras separat i två kolumner.

2. Välj en tom cell för att mata ut resultatet (här väljer jag F6) och klicka sedan på Kutools > Formel Helper > Formel Helper. Se skärmdump:

3. I Formel Helper dialogrutan, konfigurera följande:

  • 3.1 I Välj en formel rutan, hitta och välj Leta efter ett värde i listan;
    tips: Du kan kontrollera Filter rutan, ange ett visst ord i textrutan för att snabbt filtrera formeln.
  • 3.2 I Tabell_array välj tabellen utan rubriker som du skapade i steg 1;
  • 3.2 I Uppslagningsvärde välj cellen som innehåller det specifika värde du kommer att returnera värde baserat på;
  • 3.3 I Kolumn rutan, ange kolumnen som du returnerar det matchade värdet från. Eller så kan du ange kolumnnumret i textrutan direkt efter behov.
  • 3.4 Klicka på OK knapp. Se skärmdump:

Från och med nu, när du ändrar värdet i E6 till en specifik, kommer dess motsvarande värde att returneras i F6 omedelbart. Se resultatet som nedan:

  Om du vill ha en gratis provperiod (30 dagar) av det här verktyget, klicka för att ladda ner den, och gå sedan till för att tillämpa operationen enligt ovanstående steg.


Kutools för Excel - Hjälper dig att alltid slutföra arbetet före tiden, ha mer tid att njuta av livet
Kommer du ofta att spela inhämtning med arbete, brist på tid att spendera för dig själv och familjen?  Kutools för Excel kan hjälpa dig att hantera 80% Excel pussel och förbättra 80% arbetseffektivitet, ger dig mer tid att ta hand om familjen och njuta av livet.
300 avancerade verktyg för 1500 arbetsscenarier, gör ditt jobb så mycket enklare än någonsin.
Behöver inte längre memorera formler och VBA-koder, ge din hjärna vila från och med nu.
Komplicerade och upprepade operationer kan göras en engångsbehandling på några sekunder.
Minska tusentals tangentbord och musoperationer varje dag, säg adjö till yrkessjukdomar nu.
Bli en Excel-expert på tre minuter, hjälp dig snabbt att bli erkänd och en löneförhöjning.
110,000 300 mycket effektiva människor och XNUMX+ världsberömda företags val.
Gör din $ 39.0 värt mer än $ 4000.0 utbildning av andra.
Fullständig gratis provperiod i 30 dagar. 60-dagars pengarna-tillbaka-garanti utan anledning.

Comments (98)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
What would I need to add to this formula (Method A) to get a third BLANK option? And where would it go?
Example:
If the cell I'm searching is blank, I would like it to return no value in the other cell. I do not want the "if false" value to populate.
This comment was minimized by the moderator on the site
i want a cell to automatically choose a number based on the drop-down option in the cell before, e.g drop-down, half meal, full meal, if I select half meal drop-down, the next cell should show 50% while the full meal drop-down will reflect 100%. please help
This comment was minimized by the moderator on the site
Hi Josh,
In the cell where you want to output the percentage, enter the following formula and press the Enter key. Hope I can help.
=IF(C15="half meal", "50%", IF(C15="full meal", "100%", ""))
This comment was minimized by the moderator on the site
Is it possible to return a certain value in 1 column based on another?


What I currently have: On a differnt tab (same worksheet):
Column A Column B
Location Name Dept Location Name Location Code
Miami 4455 Miami 123


What I want to happen:
Location Name Dept
Miami 11234455

In Coumn B, I want it to first add a 1, then take what is in Column A, see what is the Location Code on then different tab, insert that location code, and add that to the front of the current data in Column B.

1 + 123 + 4455
This comment was minimized by the moderator on the site
Hi Jen Rader,
You can apply the following formula to get it done.
=IFERROR(1&VLOOKUP(A9,Sheet2!$A$2:$B$5,2, 0)&VLOOKUP(Sheet1!A9,Sheet1!$A$2:$B$5,2, 0),"")
In this formula,
1. A9 is the cell contains the value you want to return values based on;
2. Sheet2 is the tab name contains the "Location Code"; If the tab name contains space, please enclose the tab name in single quotes, such as 'tab name'.
3. Sheet1 is the tab name contains the "Dept";
4. $A$2:$B$5 is the range containing the table data (include both search values and return values ).
See screenshots below:
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/return1.png
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/return2.png
This comment was minimized by the moderator on the site
OMG Crystal! You are amazing! Show me your ways! Thank you so much - it worked exactly like I was hoping!
This comment was minimized by the moderator on the site
I am trying to find out the formula to copy the number shown in B2 on cell D2 if the Cell C2 has a letter "S". Can anyone help me?
This comment was minimized by the moderator on the site
Hi Aurora,
Please enter the following formula in cell D2.
=IF(ISNUMBER(SEARCH("S",C2)),B2,"No qualify")
This comment was minimized by the moderator on the site
Bonjour à tous, j'ai un tableau Excel et j'aimerais réaliser via une macro l'opération suivante: si une cellule contient une date, me renvoyer une valeur dans une autre cellule. Pourriez vous m'aider s'il vous plait? Je vous remercie par avance
This comment was minimized by the moderator on the site
STALLS D 25 Palais - Stalls SR
STALLS M 19 Palais - Stalls SR
LOUNGE E 22 Palais - Lounge SR
LOUNGE G 23 Palais - Lounge SL
ORCH K 40 Palais - Orchestra SR
For each line in a spreadsheet I need to evaluate against a table like above and find the value that matches all of the first 3 values.
Normally I would use sumifs for this type of problem but the answer is a text string so it returns 0
This comment was minimized by the moderator on the site
I need a formula that makes column N equal the text “OTO” if column K equals MCS TRAINING how do I do that???
This comment was minimized by the moderator on the site
Hi Abby,Please apply the following formula in the cells of column N:=IF(ISNUMBER(MATCH("MCS TRAINING",K1)),"OTO","NULL")
This comment was minimized by the moderator on the site
Hi - This is my formula that I am working with.  Currently it works, but where B21 is being returned, the value of B21 is a link to another place altogether.  I want to keep the display text but would like to include the link as well.  Can this be done?  =IF(ISNUMBER(SEARCH("DATA_MAPPING",general_report!AJ21)),general_report!B21,"")
This comment was minimized by the moderator on the site
Is it possible to split the return value to a different tab? IE: columns B and C are located on one tab, and values in columns E and F are located on a different tab?
This comment was minimized by the moderator on the site
Hi

Is it possible to populate another cell, not the cell with the formula.

Example
A1 Yes
A2 3
A3 Formula searches A1, Grabs value at A2 and if Yes Paste it in A4
A4 3 
This comment was minimized by the moderator on the site
Hi,
Sorry can't help you with the problem. I suggest you post the problem to the forum below to get help from other Excel enthusiasts.
https://www.extendoffice.com/forum/kutools-for-excel.html 
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations