body {
margin: 0;
}
.header {
width: 80%;
height: 20%;
margin-left: 10%;
position: fixed;
top: 0;
box-sizing: border-box;
border-style: solid;
border-width: 1px;
background-color: green;
}
.image {
width: 20%;
height: 100%;
float: left;
box-sizing: border-box;
border-style: solid;
border-width: 1px;
}
.navigation {
width: 79%;
height: 100%;
float: right;
text-align: right;
box-sizing: border-box;
border-style: solid;
border-width: 1px;
}
ul {
height: 100%;
font-size: 0;
box-sizing: border-box;
border-style: solid;
border-width: 1px;
background-color: yellow;
}
li {
height: 100%;
font-size: initial;
display: …Run Code Online (Sandbox Code Playgroud) A B
1 2020-01-01 2020-01-01 =TEXT(A1,"YYYY-MM-DD")
2
3
Run Code Online (Sandbox Code Playgroud)
在我的电子表格中,我date写入了一个Cell A1并将其更改为TEXT具有 中公式的格式Cell B1。
只要我使用英文版的 Excel,这一切就可以正常工作。
现在,波兰的一位同事需要在波兰 Excel 版本中使用该文件。
一旦他打开文件,公式就会Cell B1更改为:
=TEKST(A2;"YYYY-MM-DD")
Run Code Online (Sandbox Code Playgroud)
这个公式返回一个,error因为在波兰YYYY-MM-DD你需要使用RRRR-MM-DD。
因此,我想知道是否可以以某种方式使此文本格式国际化,以便无论您的 Excel 设置为哪种语言,公式都可以工作?
CREATE TABLE Inbound (
Inbound_Date DATE,
Product TEXT,
InboundType TEXT,
Quantity VARCHAR(255)
);
INSERT INTO Inbound
(Inbound_Date, Product, InboundType, Quantity)
VALUES
("2017-05-23", "Product A", "Supplier", "400"),
("2018-09-10", "Product B", "Supplier", "200"),
("2018-12-14", "Product B", "Supplier", "600"),
("2019-01-03", "Product A", "Return", "700"),
("2019-02-15", "Product C", "Supplier", "650"),
("2017-09-04", "Product C", "Supplier", "380"),
("2019-01-09", "Product A", "Return", "120"),
("2019-02-16", "Product A", "Return", "470"),
("2019-02-12", "Product A", "Supplier", "920"),
("2019-02-15", "Product C", "Return", "860"),
("2018-01-03", "Product …Run Code Online (Sandbox Code Playgroud) HTML:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="navigation_desktop">
<div class="button">1.0 Main Menu
<div class="FadeItem">
<ul>
<li>1.1 Sub Menu </li>
<li class="button">1.2 Sub Menu
<div class="FadeItem">
<ul>
<li>1.2.1 Sub Menu</li>
<li>1.2.2 Sub Menu</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.button {
float: left;
position: relative;
padding-left: 1%;
padding-right: 1%;
cursor: pointer;
}
.FadeItem {
display: none
}
.FadeItem .FadeItem {
position: absolute;
left: 100%;
top: 0;
width: 130px;
height: 100%;
}
Run Code Online (Sandbox Code Playgroud)
jQuery的:
$(document).ready(function() {
$(".button").mouseenter(function() {
$(this).children(".FadeItem").fadeIn(500);
});
$(".button").mouseleave(function() {
$(this).children(".FadeItem").fadeOut(500);
}); …Run Code Online (Sandbox Code Playgroud) 我使用以下代码允许用户将值写入单元格A1.
Sub TestUsername()
If Environ("Username") = "firstname1.lastname1" Or Environ("Username") = "firstname2.lastname2" _
Or Environ("Username") = "firstname3.lastname3" Or Environ("Username") = "firstname4.lastname4" Then
Sheet1.Range("A1").Value = 1
Else
Sheet1.Range("A2").Value = 2
End If
End Sub
Run Code Online (Sandbox Code Playgroud)
如您所见,我列出了允许使用我的VBA代码在Cell A1中输入值的每个用户OR-condition.这一切都很好.
现在,我想知道是否有更简单的方法来做到这一点.像这样的东西:
Sub TestUsername()
If List of or-conditions: {"firstname1.lastname1", "firstname2.lastname2", _
"firstname3.lastname3", "firstname4.lastname4"} = True Then
Sheet1.Range("A1").Value = 1
Else
Sheet1.Range("A2").Value = 2
End If
End Sub
Run Code Online (Sandbox Code Playgroud)
我只是在PHP中知道你可以像这里压缩多个条件.因此,我认为这对于VBA编程也是可能的.
我有以下简单的 Excel 电子表格:
A B C D
1 CW02 2020-01-06 CW03 2020-01-13
2 CW02 2020-01-07 2020-01-14
3 CW02 2020-01-08 2020-01-15
4 CW02 2020-01-09 2020-01-16
5 CW02 2020-01-10 2020-01-17
6 CW02 2020-01-11 2020-01-18
7 CW02 2020-01-12 2020-01-19
8 CW03 2020-01-13
9 CW03 2020-01-14
10 CW03 2020-01-15
11 CW03 2020-01-16
12 CW03 2020-01-17
13 CW03 2020-01-18
14 CW03 2020-01-19
15
16
Run Code Online (Sandbox Code Playgroud)
在Cell C1我想从Column A. 在上面的例子中CW03。
基于此标准,所有与该日历周相关的天数Column B都应列在 中Column D。
随着=VLOOKUP($C$1,$A:$B,2,FALSE)我只能够提取的第一个值。 …
HTML:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="Button">Button
<div class="FadeItem">
<ul>
<li>Main Menu A </li>
<li class="Button">Main Menu B
<div class="FadeItem">
<ul>
<li>Sub Menu B</li>
<li>Sub Menu B</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.button{
float: left;
}
.FadeItem{
display: none;
}
Run Code Online (Sandbox Code Playgroud)
jQuery:
$(document).ready(function () {
$(".Button").hover(function(){
$(".FadeItem").fadeToggle(500);
});
});
Run Code Online (Sandbox Code Playgroud)
如您所见,上面的简单代码在某些项目的内容中淡出。问题是当我将光标放在它闪烁的淡入内容上时,但我希望内容不闪烁地显示。
你知道我需要在我的代码中更改什么来取消闪烁吗?
我有一个包含不同工作表的 Excel 文件。每个工作表groups都有Columns和Rows。
现在我想要一个 VBA 来遍历每张表并折叠组。
因此,我编写了以下代码:
Sub Collapse()
Dim b As Worksheet
For Each b In Worksheets
ActiveWindow.Outline.ShowLevels ColumnLevels:=1
ActiveWindow.Outline.ShowLevels RowLevels:=1
Next b
End Sub
Run Code Online (Sandbox Code Playgroud)
不幸的是,对于此代码,我收到运行时错误 438。
您知道我需要在 VBA 中修改什么才能折叠每个工作表中的所有组吗?
我使用以下VBA插入按钮:
Sub Insert_Button()
Dim Button_01 As Button
Set Button_01 = Sheet1.Buttons.Add(423.75, 0, 48, 15)
Set Range_Button_01 = Sheet1.Range("B1:C5")
Button_01.Name = "Button_01"
With Button_01
.Top = Range_Button_01.Top
.Left = Range_Button_01.Left
.Width = Range_Button_01.Width
.Height = Range_Button_01.Height
.Text = "Button_01"
.OnAction = "Insert_Values"
End With
End Sub
Run Code Online (Sandbox Code Playgroud)
所有这些完美地工作。
如您所见,我已经.onAction为按钮分配了VBA :
Sub Insert_Values()
Sheet1.Range("A1").Value = 200
End Sub
Run Code Online (Sandbox Code Playgroud)
插入按钮后,单击它,我收到以下错误消息:
This macro may not be available in this workbook or all macros may be disabled
Run Code Online (Sandbox Code Playgroud)
到目前为止,我试图.OnAction像这样更改属性:
.OnAction = ActiveSheet.Name & …Run Code Online (Sandbox Code Playgroud)