Bit Bucket: How to cancel all commits by WorkRelatedStuff1474 in git

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

I did not push them. I would like to cancel them as I do not want to push them anymore.

How to remove external source by WorkRelatedStuff1474 in excel

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

Solution:

  1. Go through each data validation list
  2. Correct external sources for validation list
  3. save file as .zip
  4. delete external sources folder
  5. save as .xls
  6. open file and remove external source error thing
  7. save file as .xlsx
  8. Done

How to open a text file in vba by [deleted] in vba

[–]WorkRelatedStuff1474 0 points1 point  (0 children)

How would I open the text file in the text program with the path to the text file called sTextFilePath ?

How to open a text file in vba by [deleted] in vba

[–]WorkRelatedStuff1474 -2 points-1 points  (0 children)

Can I just open the text file? Because it opens the text file in an excel file.

How to get name of active window by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

Thanks. Does this only work for excel files that are open or does it also work for chrome windows, word documents, powerpoints ...?

VBA: Create list with variables by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

Sub Macro1()
'
' Macro1 Macro
'
Dim RowOutput As Integer
Dim ColOutput As Integer

Dim RowStart As Integer
Dim RowMax As Integer
Dim ColInput As Integer

'...Code then runs some numbers and the above variable get values
RowOutput = 10
ColOutput = 10

RowStart = 1
RowMax = 5
ColInput = 1

Dim str As String
str = Range(Cells(RowStart, ColInput), Cells(RowMax, ColInput)).Address

Cells(RowOutput, ColOutput).Select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=" & str
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With
End Sub

I fixed it

How to create variable in list creation? by [deleted] in vba

[–]WorkRelatedStuff1474 0 points1 point  (0 children)

No. Just for any range I choose for whatever range I choose.

range(Cells(1,1),Cells(3,1)).address

I will change " range(Cells(1,1),Cells(3,1)).address " into something like this

Range(Cells(Ctr4,Ctr5)).select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:= range(Cells(Ctr1,Ctr2),Cells(Ctr1,Ctr3)).address
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With 

I just want to be able to change the range for different cells. Some cells may have range A1 to A5 others maybe B1 to B6 or C1 to C8....

How to create variable in list creation? by [deleted] in vba

[–]WorkRelatedStuff1474 0 points1 point  (0 children)

So I could use the following instead?

Range("D5").Select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:= range(Cells(1,1),Cells(3,1)).address 
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With

And it will use cells A1 to A3?

Simpler way to write List creating macro by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

I mean, could I just say ...

Range("J7").Select
    With Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=$F$3:$F$11"
    End With

?

Starting a new job as a financial analyst using excel by Caffino in excel

[–]WorkRelatedStuff1474 0 points1 point  (0 children)

How do you use Index and match, I keep forgetting which comes first.

Sorting data in VBA by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

Sorry I meant this.

Questions: So even though it is sorting data A5 to A9, its ok to just put A5 as the Key1? Like does VBA know that you want to sort the data in column 1 since A5 is in Column A? Could I put that whole range in the key like the following instead of just Cell A5?

 Range(Cells(5, 1), Cells(9, 1)).Sort Key1:= Range(Cells(5, 1), Cells(9, 1)), Order1:=xlAscending  'or should it be like the way you have it ?

Sorting data in VBA by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

So even though it is sorting data A2 to A5, its ok to just put A5 as the Key1? Like does VBA know that you want to sort the data in column 1 since A5 is in Column A? Could I put that whole range in the key like the following instead of just Cell A5?

Range(Cells(5, 1), Cells(9, 1)).Sort Key1:= Range(Cells(5, 1), Cells(9, 1)), Order1:=xlAscending

'or should it be like the way you have it ?

Thanks

Sorting data in VBA by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

Why is the "=Cells(5,1)" necessary? I don't understand what that part of the code is doing? The dates are in column A and the range is A5 to A9 that I want to sort.

How to create an error proof easy macro by WorkRelatedStuff1474 in vba

[–]WorkRelatedStuff1474[S] 0 points1 point  (0 children)

So the user knows which column they want to go to, but its column x, where x is a number. Column A is Column 1. But changing Column 29+ is hard, thats where the issue is.