1) INPUT BOX 1 AMOUNT INPUT BOX2
[Add More .] when click this button should slidedown like below
1) INPUT BOX 1 AMOUNT INPUT BOX2
2) INPUT BOX 3 AMOUNT INPUT BOX4 (x) (close button)
[Add More .] when clicked again slideDown to 3rd row.
1) INPUT BOX 1 AMOUNT INPUT BOX2
2) INPUT BOX 3 AMOUNT INPUT BOX4 (x) (close button)
3) INPUT BOX 5 AMOUNT INPUT BOX6 (x) (close button)
[Add More .] when clicked again slideDown to 4th row.
when click close that row should slideUp.
Related
I have a table that looks like this example:
Order Bagged Shipped
----------------------------------
1 Y
2 Y
1 Y
3 Y
I want to combine like order numbers into 1 row like below:
Order Bagged Shipped
----------------------------------
1 Y Y
2 Y
3 Y
How can I do this in PowerBi desktop?
Assuming your data really is as simple as your example (values are either null or 'Y' and no conflicts), I suggest something like:
SELECT Order, MAX(Bagged), MAX(Shipped)
FROM mytable
GROUP BY Order
The GROUP BY Order indicates you want one row per order, the MAX for the other columns ensures you get the 'Y' (if it exists for that Order) or null (if 'Y' doesn't exist for that Order).
In BI, select Transform, then add the GroupBy function to your existing code:
#"Grouped Rows" = Table.Group(#"Previous Step", {"Order"}, {
{"Bagged", each if List.Contains([Bagged], "Y") then "Y" else null},
{"Shipped", each if List.Contains([Shipped], "Y") then "Y" else null}
})
in
#"Grouped Rows"
I have a table with three columns in google sheets:
Column A (raw data): it containss different strings for which I need to extract the character "Y" + a match with a string in columns B.
-Columns B: is an unordered list of codes that can occur multiple times as a substring in column A
Column C displays the expected outcome.
Column A (raw data):
Row 1: X Y Apple
Row 2: Z Apple
Row 3: K
Row 4: L M Y Orange
Column B (codes to match, unordered):
Row 1: Apple
Row 2: Orange
Row 3: Mango
Row 4: Banana
Column C (expected outcome):
Row 1: Y Apple
Row 2: Apple
Row 3: (empty cell)
Row 4: Y Orange
I'm not 100% clear on what you need, but is it this in cell C1?
=arrayformula(trim(if(regexmatch(A1:A,"Y "),"Y ",)&if(countif(B:B,iferror(regexextract(A1:A,"\ (\w+)$")))>=1,iferror(regexextract(A1:A,"\ (\w+)$")),)))
I am looping through an excel sheet, looking for a specific name. When found, I print the position of the cell and the value.
I would like to find the position and value of a neighbouring cell, however I can't get .cell() to work by adding 2, indicating I would like the cell 2 columns away in the same row.
row= row works, but column= column gives error, and column + 2 gives error. Maybe this is due to me listing columns as 'ABCDEFGHIJ' earlier in my code? (For full code, see below)
print 'Cell position {} has value {}'.format(cell_name, currentSheet[cell_name].value)
print 'Cell position next door TEST {}'.format(currentSheet.cell(row=row, column=column +2))
Full code:
file = openpyxl.load_workbook('test6.xlsx', read_only = True)
allSheetNames = file.sheetnames
#print("All sheet names {}" .format(file.sheetnames))
for sheet in allSheetNames:
print('Current sheet name is {}'.format(sheet))
currentSheet = file[sheet]
for row in range(1, currentSheet.max_row + 1):
#print row
for column in 'ABCDEFGHIJ':
cell_name = '{}{}'.format(column,row)
if currentSheet[cell_name].value == 'sign_name':
print 'Cell position {} has value {}'.format(cell_name, currentSheet[cell_name].value)
print 'Cell position TEST {}'.format(currentSheet.cell(row=row, column=column +2))
I get this output:
Current sheet name is Sheet1
Current sheet name is Sheet2
Cell position D5 has value sign_name
and:
TypeError: cannot concatenate 'str' and 'int' objects
I get the same error if I try "column = column" as "column = column +2".
Why does row=row work, but column=column dosen't? And how to find the cell name of the cell to the right of my resulting D5 cell?
The reason row=row works and column=column doesn't is because your column value is a string (letter from A to J) while the column argument of a cell is expecting an int (A would be 1, B would be 2, Z would be 26, etc.)
There are a few changes I would make in order to more effectively iterate through the cells and find a neighbor. Firstly, OpenPyXl offers sheet.iter_rows(), which given no arguments, will provide a generator of all rows that are used in the sheet. So you can iterate with
for row in currentSheet.iter_rows():
for cell in row:
because each row is a generator of cells in that row.
Then in this new nested for loop, you can get the current column index with cell.column (D would give 4) and the cell to the right (increment by one column) would be currentSheet.cell(row=row, column=cell.column+1)
Note the difference between the two cell's: currentSheet.cell() is a request for a specific cell while cell.column+1 is the column index of the current cell incremented by 1.
Relevant OpenPyXl documentation:
https://openpyxl.readthedocs.io/en/stable/api/openpyxl.cell.cell.html
https://openpyxl.readthedocs.io/en/stable/api/openpyxl.worksheet.worksheet.html
How can I make it so the formula on E2 reads values entered in any of the search cells and displays it as results, considering I have a button to clear all search boxes and users are instructed to only search one box at a time and to press the button if multiple boxes are filled?
See image
Here's my editable Spreadsheet
Much appreciated.
try:
=IFNA(QUERY(A2:C4; "where A = '"&B6&"'
or B = '"&B7&"'
or C = '"&B8&"'"; 0))
I'd like results to be shown only if the data users look for are in the same row.
=IFNA(QUERY(A2:C4; "where A = '"&B6&"'
and B = '"&B7&"'
and C = '"&B8&"'"; 0))
UPDATE:
=IFNA(QUERY(A2:C4; "where "&TEXTJOIN(" and "; 1;
IF(B6="";;"A = '"&B6&"'");
IF(B7="";;"B = '"&B7&"'");
IF(B8="";;"C = '"&B8&"'"))&""; 0))
You can combine conditions via + and *
=IFNA(
FILTER(A2:C4;(A2:A4=B6)+(B2:B4=B7)+(C2:C4=B8));
"Enter the data for the request"
)
I have a combobox filled with values. I want to select a value in the combo box and click the "Add" button to place this value into the some cells below. I can add one item to my list using the following code, but I want to be able to add multiple items. I feel that I am very close, I just need a few tweaks!
Private Sub CommandButtonAddItem_Click()
Dim ws As Worksheet
Dim box As ComboBox
Dim food As String
Dim num As Integer
num = 19
Set ws = Worksheets("sheet1")
Set box = ws.OLEObjects("ComboBox1").Object
food = box.Value
Worksheets("sheet1").Cells(num, 1) = food
If Worksheets("sheet1").Cells(num, 1) = " " Then
Worksheets("sheet1").Cells(num, 1) = food
num = num + 1
End If
End Sub
Try THIS!
If the "default" cell is already occupied, it'll keep going down untill it finds one that's not empty, to then put the value in that cell.
Private Sub CommandButtonAddItem_Click()
Dim ws As Worksheet
Dim box As ComboBox
Dim food As String
Dim num As Integer
num = 19
Set ws = Worksheets("sheet1")
Set box = ws.OLEObjects("ComboBox1").Object
food = box.Value
While Worksheets("sheet1").Cells(num, 1) <> ""
num = num + 1
Wend
Worksheets("sheet1").Cells(num, 1) = food
End If
End Sub