我需要创建一个公式来显示 Hello ,如果它在excel中的值列表中找到 HelloWorld 。如果它没有找到该值,它应该显示现有值在那个清单中。
我的价值观是这样的:
HelloIndia
HelloAustralia
HelloWorld
请建议
答案 0 :(得分:0)
Sub FindReplaceAll()
'PURPOSE: Find & Replace text/values throughout entire workbook
'SOURCE: www.TheSpreadsheetGuru.com
Dim sht As Worksheet
Dim fnd As Variant
Dim rplc As Variant
fnd = "Hello"
rplc = "HelloWorld"
For Each sht In ActiveWorkbook.Worksheets
sht.Cells.Replace what:=fnd, Replacement:=rplc, _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
SearchFormat:=False, ReplaceFormat:=False
Next sht
End Sub
原始来源:
https://www.thespreadsheetguru.com/the-code-vault/2014/4/14/find-and-replace-all
答案 1 :(得分:0)
如果你想要一个简单的excel功能而不是去VBA / Macro路线......这可能就是你的答案 (示例假定列表在单元格A1中)
from PIL import Image
img = Image.open("mandrill.png").rotate(180).transpose(Image.FLIP_LEFT_RIGHT)
# use img.convert("RGBA").tobytes() as texels
答案 2 :(得分:0)