自定义验证/帮助的公式 [英] Formula for Custom Validation/Help

查看:70
本文介绍了自定义验证/帮助的公式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我在EXEL中对VBA很新,也是这个论坛的新手。我有验证问题。当我撕开头发时,我正在尝试为客户验证创建一个公式。它起作用,我不明白我做错了什么。可能有人
怜悯和解释什么是w

Hi! I'm pretty new to VBA in EXEL and also new to this forum. I have a problem with validation. I am trying to create a formula to Customer validation as I tear my hair with. It works take at all and I do not understand what I am doing wrong. Could someone have mercy on and explain what is w

Dim ws As Worksheet
Dim text As Worksheet
Dim dC As Worksheet

Dim rng As Range
Dim LastRow As Long
Dim MyValidationFormula As Variant
Dim sheetName As String
Dim rngValidation As Range

On Error GoTo ErrHandler
                        
Set text = ThisWorkbook.Worksheets("konfigkonfig")
Set dC = ThisWorkbook.Worksheets("projektB")

LastRow = ActiveSheet.Range("D" & Rows.Count).End(xlUp).row
                        
Set rng = ActiveSheet.Range("K27" & ":K" & LastRow)

'"OCH(" = AND(,      		 "ÄRTAL(" = ISNUMERIC(

MyValidationFormula = "=OCH(K$8=1;ÄRTAL(K27);BH27<>1)"     

   
With rng.Validation
.Delete
.Add Type:=xlValidateCustom,  _
AlertStyle:=xlValidAlertStop, _
Formula1:=MyValidationFormula          'This row faile
                                     
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With




rong所以我会永远感激/ Anders


rong so I'll be forever grateful/Anders

推荐答案

AndersViggen,

re:验证中使用的公式



" IsNumeric"用于VBA,

"IsNumber" Excel在公式中使用。



我无法让谷歌翻译"ARTAL"成为英语



'---

Jim Cone

https://goo.gl/IUQUN2
AndersViggen,
re: formula used in Validation

"IsNumeric" is used in VBA,
"IsNumber" is used by Excel in formulas.

I can't get Google to translate "ARTAL" into English

'---
Jim Cone
https://goo.gl/IUQUN2


这篇关于自定义验证/帮助的公式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆