Вы находитесь на странице: 1из 24

FCM in Excel

https://www.extendoffice.com/documents/excel/3730-excel-if-cell-contains-text-then-return-value-in-another-cell.html

How To Return Value In Another Cell If A Cell Contains Certain Text In


Excel?
As the example shown as below, when cell E6 contains value “Yes”, cell F6 will be automatically populated with value “approve”. If
you have changed the “Yes” to “No” or “Neutrality” in E6, the value in F6 will be changed to “Deny” or “Reconsider” immediately.
How can you do to achieve it? This article collects some useful methods to help you easily solve it

 Method A: Return value in another cell if a cell contains certain text with formula
 Method B: Return values in another cell if a cell contains different texts with formula
 Method C: Several clicks to easily return values in another cell if a cell contains different texts
Easily select entire rows or entire rows in the selection based on cell value in a certain column:

The Select Specific Cells utility of Kutools for Excel can help you quickly select entire rows or entire rows in the selection based
on specific cell value in a certain column in Excel. Download the full feature 60-day free trail of Kutools for Excel now!

Return Value In Another Cell If A Cell Contains Certain Text With Formula
For returning value in another cell if a cell contains only a specific text, please try the following formula. For example, if B5 contains
“Yes”, then return “Approve” in D5, otherwise, return “No qualify”. Please do as follows.

Select D5 and copy below formula into it and press the Enter key. See screenshot:

Formula: Return value in another cell if a cell contains certain text

=IF(ISNUMBER(SEARCH("Yes",D5)),"Approve","No qualify")

Notes:

1. In the formula, “Yes”, D5, “approve” and “No qualify” indicate that if cell B5 contains text “Yes”, the specified cell will be populated
with text “approve”, otherwise, it will be filled with “No qualify”. You can change them based on your needs.

2. For returning value from another cells (such as K8 and K9) based on a specified cell value, please use this formula:

=IF(ISNUMBER(SEARCH("Yes",D5)),K8,K9)
Bring Tabbed Editing and Browsing in Office
--- Make Your Work Much Easier
Office Tab will save 50% of your work time when browsing & editing multiple documents.
Unbelievable! The operation of two or more documents is even pleasant than the single document operation.
Reduce thousands of keyboard & mouse operations every day, farewell to occupational diseases now.
The interface of Office Tab is far more powerful and efficient than internet browsers.
Read More >> Download Now Purchase

Return Values In Another Cell If A Cell Contains Different Texts With Formula
This section is going to show you the formula for returning values in another cell if a cell contains different text in Excel.

1. You need to create a table with the specific values and return values that located separately in two columns. See screenshot:
2. Select a blank cell for returning the value, type the below formula into it and press the Enter key to get the result. See
screenshot:

Formula: Return values in another cell if a cell contains different texts

=VLOOKUP(E6,B5:C7,2,FALSE)

Notes:

In the formula, E6 is the cell contains the specific value you will return value based on, B5:C7 is the column range containing the
specific values and the return values, the 2 number means that the return values locating on the second column in the table range.
From now on, when changing the value in E6 to a specific one, its corresponding value will be returned in F6 immediately.

Easily Return Values In Another Cell If A Cell Contains Different Texts


Actually, you can solve the above problem by an easier way. The Look for a value in list utility of Kutools for Excel can help you
to achieve it with only several clicks without remembering formula.

1. The same as the above method, you also need to create a table with the specific values and return values that locate separately
in two columns.
2. Select the cell you will automatically return values based on specific cell value, click Kutools > Formula Helper > Look for a
value in list. See screenshot:
3. Then the Formula Helper dialog box pops up:

 3.1 In the Table_array box, select the table without headers you have created in step 1;
 3.2 In the Look_value box, select the cell contains the specific value you will return value based on;
 3.3 In the Column box, select the column range (without header) that contains the values you will auto return;
 3.4 Click the OK button. See screenshot:
From now on, when changing the value in E6 to a specific one, its corresponding value will be returned in F6 immediately. See
result as below:
Tip. If you want to have a free trial (60-day) of this utility, please click to download it, and then go to apply the operation according
above steps.
https://contexturesblog.com/archives/2010/02/08/excel-price-list-with-vlookup-and-match-function/

Excel Price List With VLOOKUP and MATCH Function

You can create order forms and price lists in Excel, and automatically show a price when a product is selected in the order form. But
what happens if you want to give some customers special pricing, or offer sales pricing occasionally? Here's how to customize your
Excel price list with VLOOKUP and MATCH.

Using the VLOOKUP Function

With a simple VLOOKUP function in Excel, you can pull a product price from a lookup table. For example, if a customer orders a
jacket, the price is 25, based on this lookup table. The lookup table is a named range, ProductLookup.
To show the price after a product is selected in an order form, use a VLOOKUP formula to find that product in the lookup table. For
example:

=IF(B11="","",VLOOKUP(B11,ProductLookup,2,FALSE))

If cell B11 is empty (no product has been selected), the formula result is an empty string, and cell C11 will appear empty.

If a product has been selected in cell B11, the VLOOKUP formula finds the price in column 2 of the ProductLookup table.
Select a Variable Column

In the simple example shown above, the price will always come from the second column of the lookup table.

To use variable pricing, you could create a lookup table with two or more columns of prices, instead of just one.

In this example, the ProductLookup table has four columns, instead of two - Product, Price, Promo and Sale.

Select a Pricing Type

On the order form, add a drop down list where you can select one of those pricing types – Price, Promo or Sale.
Change the VLOOKUP

Then, in the VLOOKUP formula, replace the column number with a MATCH formula.

=IF(B11="","",VLOOKUP(B11,ProductLookup,MATCH($E$4,Pricing,0)+1,FALSE))

The MATCH formula finds the pricing type selected in cell E4, in a range named Pricing (cells B1:D1 in the lookup table).
How It Works

If Promo is selected, the MATCH formula returns a 2, because Promo is the second item in the Pricing range.

You’ll add 1 to that number, because the ProductLookup table has one column to the left of the pricing columns.

So, 2 + 1 = 3, and the promo pricing will come from the 3rd column of the ProductLookup table.

Security Tip: How To Protect Very Hidden Sheets


Any worksheet can be hidden, assuming at least one sheet remains visible in a workbook. Unless the workbook structure is password
protected, any hidden sheet can easily become visible again.

To hide a sheet: Right click the sheet tab & select Hide.

Excel has two levels of hidden sheets, hidden and very hidden sheets. The difference between the two is simply that very hidden sheets do
not appear in the Unhide dialog box. If the workbook contains both hidden and very hidden sheets, when a user opens the Unhide dialog box,
the very hidden sheets do not appear.

In order to ensure that hidden sheets 'stay hidden', sheet visibility should be modified in Visual Basic Editor (VBE) using a setting called 'Very
Hidden'.
The technique is simple: set the visible property of a sheet to 'very hidden'. The sheet won't appear in the Unhide dialog box anymore. Please,
follow the 3 steps outlined below:

Step 1: Right-click the sheet tab & choose View Code in the popup menu or launch VBE with ALT-F11
Step2: Select the worksheet you want to hide in the Visual Basic Editor & press F4 to display sheet properties

Step 3: From the Visible property drop-down list, select the 2-xlSheetVeryHidden setting

To protect the stealthy 'very hidden' sheets from becoming visible again, some users believe that the VBA Project should be locked with a
password. However, this thinking is flawed for 2 reasons:
 The VBE can be password locked, only if the workbook is saved in a macro-enabled file format, such as .xlsm, xltm or .xlsb. The
default XML-based file format .xlsx for Excel 2007 (or later) cannot store Visual Basic for Applications (VBA) macro code, as there isn't
any vbaProject.bin (the file where code is stored) inside the XML container.

 But even if the active workbook is macro enabled, savvy users can execute VBA code from a second open workbook or add-in and
make very hidden sheets visible easily.

So, don't get misled by this myth and rely on the VBE password to keep sheets very hidden.

The Workaround
To prevent users from modifying hidden or very hidden sheet visibility, the workbook structure of any workbook, whether macro enabled or not,
should be password protected. Any attempt to modify the visible property of a hidden sheet will trigger one of the messages below to be
displayed.
Messages shown in unlocked VBE after an attempt to alter the Visible property of a sheet
while Workbook structure is password protected

Lock cells to protect them


Excel for Office 365 Excel for the web Excel 2019 Excel 2016
WindowsWeb

Suppose that your boss wants you to protect an entire workbook, but also wants to
be able to change a few cells after you enable protection on the workbook.
Before you enabled password protection, you had unlocked some cells in the
workbook. Now that your boss is done with the workbook, you can lock these cells.

Follow these steps to lock cells in a worksheet:

1. Select the cells you want to lock.


2. On the Home tab, in the Alignment group, click the small arrow to open
the Format Cells popup window.
3. On the Protection tab, select the Locked check box, and then click OK to close the
popup.
Note: If you try these steps on a workbook or worksheet you haven't protected, you'll see the cells are already locked. This means that the cells are
ready to be locked when you protect the workbook or worksheet.

4. On the Review tab in the ribbon, in the Changes group, select either Protect
Sheet or Protect Workbook, and then reapply protection. See Protect a
worksheet or Protect a workbook.
Tip: It's a best practice to unlock any cells that you may want to change before you protect a worksheet or a workbook, but you can also unlock them
after you apply protection. To remove protection, simply remove the password.
In addition to protecting workbooks and worksheets, you can also protect
formulas.

How to password protect an Excel file


Secure your Excel documents with a password by following these quick steps
By Jon Martindale October 16, 2019 3:30AM PST
Microsoft

If you use a computer, you probably have some Microsoft Excel documents on your Mac or PC that you wouldn’t want other people to find and
read.

After all, Excel is used by the average person, businesses, government institutions, and millions of other folks all over the world. Whether
you’re creating graphs, converting PDFs, or just inputting rows and rows of data, the best way to keep that information safe is to learn how to
password protect an Excel file.
Adding a password

Step 1: In Excel, open the document you want to secure with a password.

Step 2: Click File, followed by Info.

Step 3: Next, click the Protect Workbook button. From the drop-down menu, select Encrypt with Password.

Вам также может понравиться