![]() ![]() The Best Office Productivity Tools Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by #Using vlookup excel for mac how toHow to vlookup value and return true or false / yes or no in Excel?.How to vlookup return value in adjacent or next cell in Excel?.How to vlookup and return date format instead of number in Excel?.How to copy source formatting of the lookup cell when using Vlookup in Excel?.Keep selecting the first result cell, and drag the Fill Handle down to get all results along with their background color. Note: In the formula, E2 contains the value you will lookup, $A$1:$C$8 is the table range, and number 3means that the corresponding value you will return locates in the third column of the table. Select a blank cell adjacent to the lookup value, and then enter formula =LookupKeepColor(E2,$A$1:$C$8,3) into the Formula Bar, and then press the Enter key. Press the Alt + Q keys to exit the Microsoft Visual Basic for Applications window and go back to the worksheet.Ħ. Then check the Microsoft Script Runtime box in the References – VBAProject dialog box. After inserting the two codes, then click Tools > References. XDic.Add, xFindCell.Offset(0, xCol - 1).AddressĤ. LookupKeepColor = xFindCell.Offset(0, xCol - 1).Value Set xFindCell = LookupRng.Find(FndValue,, xlValues, xlWhole) #Using vlookup excel for mac codeVBA code 2: Vlookup and return background color with the lookup value Public xDic As New Dictionaryįunction LookupKeepColor (ByRef FndValue, ByRef LookupRng As Range, ByRef xCol As Long) Then click Insert > Module, and copy the below VBA code 2 into the Module window. Range(xDic.Keys(I)).Interior.Color = xlNoneģ. VBA code 1: Vlookup and return background color with the lookup value Sub Worksheet_Change(ByVal Target As Range) ![]() In the opening Microsoft Visual Basic for Applications window, please copy below VBA code into the Code window. In the worksheet contains the value you want to vlookup, right-click the sheet tab and select View Code from the context menu. Please do as follows to lookup a value and return its corresponding value along with background color in Excel.ġ. Amazing! Using Efficient Tabs in Excel Like Chrome, Firefox and Safari! Save 50% of your time, and reduce thousands of mouse clicks for you every day! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |