Datanitro - Create a sheet that has data validation in it? - datanitro

I have one sheet (let's call it sheet1) that has a range of cells A1 to A20 filled. My python script is going to create a new sheet (sheet2) and fill in a few cells. The user then enters in a few other new cells, say B2 to B4. I want those cells (B2 to B4) to have data validation, a list from the cells in sheet1. Is this possible?

Related

Check multiple columns and return to cell from other multiple columns

So I've added a SS of what i'm trying to do.
I need to check if Value(Col B) is Value3 and Cat (Col C) is Cat4
than fill corresponding cell (K5) under Cat/Vol table with Result +
(Number). In this case K5 should be filled with Result1(13).
Whenever a new row added under Incoming Data Table, Cat/Vol table
should also be updated with the new Result + Number. So incoming data table is dynamic and will be updated with rows only.
For instance if B11 is Value2 and C11 is Cat5 than "I4" should be
updated with the new Result and Number.
I tried placing IF and IF AND + REGEXTRACT formulas under each cell of Cat/Vol Table without anyluck. Thanks in advance.
My answer is not the most elegant but it was quick.
The heart of this formula is vlookup that searches using keys of 2 merged cells:
=ifna(ArrayFormula(vlookup($G2&H$1,{arrayformula($B$2:$B&$C$2:$C),$D$2:$E},2,false))
&"("&ArrayFormula(vlookup($G2&H$1,{arrayformula($B$2:$B&$C$2:$C),$D$2:$E},3,false))&")")
It's then copied to all the cells of new table.
Working solution is here:
https://docs.google.com/spreadsheets/d/1qbIg9nNfaOwQtSbk8R8-NkT_6cOy3AKr3Xafm72SsNI/copy

apex_item_text Add Row/Remove Row Apex

I am working with Apex_Item_Text .. i am using the below query to display the text area in apex as null initially.
select distinct a.GUID, a.CREATED_BY, a.created_date, apex_item.text(null)
Delete from
NON_DYNAMIC_USER_GROUP_MEMBERS a,
NON_DYNAMIC_USER_GROUPS b
where a.DYNAMIC_GROUP_ID in
(select DYNAMIC_GROUP_ID from NON_DYNAMIC_USER_GROUPS
where instr(','||DYNAMIC_GROUP_ID||',' , ','||:P153_ID_HIDDEN||',') > 0) ;`
In Apex application once the text area filled by user as Delete/Add, it has to update in table when submit button pressed, i don't know how to proceed further on this.
Thanks
You need to pass in a number into the apex_item.text function. By passing a number APEX will automatically create an array that will store the values of those columns.
This can be referenced in your delete statement with: APEX_APPLICATION.G_FXX(i) where XX is the number you pass into the apex_item.text function and i is the index of the item.
Without passing a number into the apex_item.text function I would have no idea how to reference that field
See oracle documentation for more information about apex_item.text: https://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_item.htm#AEAPI211

Excel Macro for data validation modification

In cell A5, a list validation is populated ( Cat A, Cat B and Cat C). When the user choose category A, cell C5 is populated by a formula that tells the user to fill in the cell. Once the user goes to Cell C5, there is no formula but a drop down or a list validation of (yes or no).
If the user then goes back to cell A5 and chooses category C, cell C5 will be populated the original formula that cell the user to again the cell. Once the user goes to cell C5, there again no formula but a drop down or a list validation (yes/no)
Is it possible to write a simple macro for this? Anyone please? Thank you so much.
I think I know how but need more thoughts.
This is pretty simple code, but not easy to figure out if you haven't written VBA before. It will require two subroutines. In your VBE double click on the worksheet in the "Project - VBAProject" pane where you want this to live. Mine is being built for workbook "Book1.xls" in the tab "Sheet1"
We are going to use subroutines based on worksheet events. Events are things that happen on the front end (like selecting a cell) that fire code in VBA.
SelectionChange - This worksheet event fires whenever a user changes cell/range selections. We will use it to detect if the user switched to cell C5
Change - This worksheet event fires when someone Changes a cell's value. We use it to see if A5 was changed
In the code editor pane in your VBE, place the following:
Private Sub Worksheet_Change(ByVal Target As Range)
'This subroutine fires when a cell value changes in this worksheet.
'did someone change something specifically in cell A5?
If Not Intersect(Target, Sheet1.Range("A5")) Is Nothing Then
'Is the value A or C?
If Sheet1.Range("A5").Value = "A" Or Sheet1.Range("A5").Value = "C" Then
'Remove any data validation for this cell:
Sheet1.Range("C5").Validation.Delete
'and change the value of C5 to "Fill in this cell"
Sheet1.Range("C5").Value = "Fill in this cell"
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'This subroutine fires when a user selects a different cell or range.
'So... it fires ALL The time so the next line is super important.
'Did someone change selection specifically to cell C5?
If Not Intersect(Target, Sheet1.Range("C5")) Is Nothing Then
'Is the value currently "Fill in this cell"?
If Sheet1.Range("C5").Value = "Fill in this cell" Then
'Empty the cell
Sheet1.Range("C5").Value = ""
'Add data validation to some list somewhere
With Sheet1.Range("C5").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$J$1:$J$4" 'This the range that the list exists in
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
End If
End Sub
I've noted the important stuff with comments. You'll probably need to monkey a bit with it to fit your needs. Most notably that cell validation code. Currently the data validation for C5 is set to J1:J4. Change that to fit your needs.

Pulling from cells in cone column and want to put in a row based in matching cell

I'm trying to put any document type from column B that matches the Item Index in column A all in one row.enter image description here
Would data from A2 go with B2 and A3 with B3 etc? If so use CONCATENATE

Using If Statement in Excel to populate when typing in a cell

I'm trying to find out if I can make a formula where I type in any value in a cell and then the next cell autopopulates with the city. Basically it will just be an address field for customers and the city will always remain the same. I just want it to be able to be blank if there is no data in the cell before it and if there is something typed in there it will populate the city in the next cell and the state in the next.
=if("a1"="","","city name") This is an if statement that is checking if the designated cell is blank and if it is then it will show blank, if there is something in there, then it will populate with what you have in "city name"
With “a cell” being in ColumnA (staring in A2), your city in B1 and State in C1 (they may already be labels) then:
=IF($A2="","",IF(ISEVEN(COLUMN()),$B$1,$C$1))
copied across one column and down may suit. If the resulting sequence is the wrong way round then either change EVEN to ODD or switch the contents of B1 and C1.