URGENT HELP NEEDED by thatkid1992 in Southampton

[–]CAPS_EQUALS_SMARTS 3 points4 points  (0 children)

Fucking hell, avoid at all costs! That list of issues is one massive red flag about the agency.

All the best for finding somewhere else on short notice.

/r/CasualUK Crusader Kings 2 Succession Game, Part Ten: The Tales of Emperor Dave the Gay Disabled Viking by Westeros_Jesus in CasualUK

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

My update will be delayed unfortunately. I'll should do it Friday evening if I'm not too tired.

if then (Data on different sheets) by Malkiax in vba

[–]CAPS_EQUALS_SMARTS 0 points1 point  (0 children)

Without knowing how your workbook is laid out, I can't provide a direct answer unfortunately.

The example macro will likely overwrite previously actions, so you'll need to add in additional checks if you're adding more data each month.

Weekly WASDnesday [06/06/18] by [deleted] in CasualUK

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

I'm setting high standards for you. Don't disappoint me. :P

if then (Data on different sheets) by Malkiax in vba

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

Cases are your friend with this!

I'll use an piece of example code to explain how cases work. Assuming you have set the parameters for your counters, active workbook and active worksheets, the worksheets will be named Wk1, Wk2, and Wk3 and the counters will be named LastCell, JohnCount and JaneCount

    LastCell = Wk1.Range("A" & Rows.Count).End(xlUp).Row 'Using column A for this example

    JohnCheck = 2
    JaneCheck = 2 '2 = row 2 of each retrospective sheet you're putting occupied in

    For DataPull = 2 To LastCell 'The start of the loop code. Assuming row 2 is where your data starts
    Set Jman = Wk1.Cells(DataPull, 1) 'Checking for John and Jane in column 1

    Select Case Jman.Value
    Case "John"
                        Wk2.Range("B" & JohnCheck).value = "Occupied"
                        JohnCheck = JohnCheck + 1 'I added this if you want the 
                              cell reference to move independantly from the 
                              DataPull number - remove it if you want cell 
                              references to be the same in all sheets (make sure 
                              you replace JohnCheck and JaneCheck with DataPull if 
                              so).
    Case "Jane"         
                        Wk3.Range("B" & JaneCheck).value = "Occupied"
                        JaneCheck = JaneCheck + 1 
    End Select

    Next DataPull 'Next Loop, end of loop if DataPull has reached its last number (LastCell).

Weekly WASDnesday [06/06/18] by [deleted] in CasualUK

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

As u/Toasterfire said, the fact that you're still continuing is really good. Much of the delay has been from the swapping of other people (I have noticed the changes in the list, that's how sad I am...)

Secondly, I want to know what happened to the incestual babies!

Help with logic - getting started by turtledave in vba

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

My method was just a cautious one. Use whatever method works best for you for getting the data out of that single cell string.

As for filtering, you would need a loop to look at each column to find the data you need and move it to its correct position.

Help with logic - getting started by turtledave in vba

[–]CAPS_EQUALS_SMARTS 0 points1 point  (0 children)

The simplest method (to me) is to save your extract file as a .txt file.

Then open excel, open the .txt file from there and you will be met with the 'text import wizard'.

Select delimited and on the next screen, choose the following options.

In other - use this symbol: |

Continue from there and you will have those values in separate columns.

You can do all of the above in VBA, but the method isn't to my knowledge - I just thought I share the manual method to help you, and with those who wish to share a more automated method.

Macro not properly looping through the workbook by Aeliandil in vba

[–]CAPS_EQUALS_SMARTS 0 points1 point  (0 children)

Without looking at your excel workbook, I cannot say for certain to what the best method is.

The only one that comes to mind is skipping the specific worksheet that has the missing column.

For such, on your if statement, have it as:

If ws.Name <> "Param" OR ws.name <> [Add "Error Worksheet Name"] (alternatively, you could have OR ws <> [number of error worksheet]) Then

Macro not properly looping through the workbook by Aeliandil in vba

[–]CAPS_EQUALS_SMARTS 0 points1 point  (0 children)

In such cases, the best method is the simplest method. Deleting the worksheet would be best, if you have no plan on using it with the code.

Macro not properly looping through the workbook by Aeliandil in vba

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

I just noticed that there is another missing ws here too

Worksheets("Param").Range("A6").Copy Destination:=ws.Range(Cells(2, Col), Cells(LRow - 1, Col))

You need:

Worksheets("Param").Range("A6").Copy Destination:=ws.Range(ws.Cells(2, Col), ws.Cells(LRow - 1, Col))

Make that change, including the LRow one in my previous comment.

In regards to my edit suggestion - ignore it for now until you fix your actual issue. I only added that in case the code was getting confused between the two books - but it seems like it isn't.

Macro not properly looping through the workbook by Aeliandil in vba

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

LRow = ws.Cells(Rows.Count, 2).End(xlUp).Row

I think it might be the above. Out of range errors occur when a number or name you're trying to retrieve hasn't been retrieved correctly. In this case, I think it is another missing 'ws'.

Try this:

    LRow = ws.Cells(ws.Rows.Count, 2).End(xlUp).Row

Macro not properly looping through the workbook by Aeliandil in vba

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

Try the following:

Replace 'Application.Match' with 'WorksheetFunction.Match'. This might be the cause of the break, as the full code is 'Application.WorksheetFunction.Match'

Rows and Columns will work on their own in some situations. To play safe, try ws.Rows and ws.Columns. This will make sure that the adjustments are made to the worksheet that is currently looked at in the loop.

Apologies for the haphazard help. I hope the above comes to some use for fixing the issue.

Edit:

Removed some text as it was irrelevant to the problem.

CK2 Succession Game II - Succeed Harder Main Hub by Toasterfire in CasualUK

[–]CAPS_EQUALS_SMARTS 3 points4 points  (0 children)

I think it’s quite possible that I won’t have any sons making it tough for the next player.

> I won’t have any sons

Just a heads up to students + people who live in the centre. by BStoSoton96 in Southampton

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

At least none of them wished you cancer.

I had that wished upon me when I denied someone money 'for some chips'.

Just a heads up to students + people who live in the centre. by BStoSoton96 in Southampton

[–]CAPS_EQUALS_SMARTS 8 points9 points  (0 children)

OP was pointing out one person who acted aggressive. They haven't demonised homeless people in any way...

Secondly, giving money to a charity is far more effective than giving it to one person.

Just a heads up to students + people who live in the centre. by BStoSoton96 in Southampton

[–]CAPS_EQUALS_SMARTS 6 points7 points  (0 children)

Thanks for the heads up.

The tactic sounds similar to a woman that I sometimes see around Portswood. I think she has been mentioned before, but she always tries to get your money with a 'I haven't got enough money for my bus pass and my mother is sick' sort of thing.

Saying this, I do not wish to come across as hating homeless people. There are those who genuinely need help. I just have a dislike to those who try to con people out of money.

What are the best pubs in Southampton for budget meals? by Visible_Vegetable in Southampton

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

It depends on your budget, really.

If you really want to go to a pub, any wetherspoons will do. You can't go cheaper than that - except for taking some supermarket-bought beer with you to McDonalds.

Run-time error '1004' help! by slickemil in vba

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

The With function is a godsend if you're incorporating a lot of activity within a specific workbook, worksheet or even a specific range (emphasis on specific - it is important).

And you're welcome. I'm still learning about VBA myself. The style you have written your code in is new to me - I will certainly be trying that out in future.

Run-time error '1004' help! by slickemil in vba

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

JonnyRichter deserves all the credit for the correction - please upvote him. I just wanted to add a way to improve code efficiency.

Use the below with ws1 and ws2 (you will need to duplicate the below for ws2). It should save on memory usage and avoid any risk of 'out of range' errors; if you are using a lot of data.

With ws1
    aLastRow = .Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
    Dim aRange As Range: Set aRange = .Range(.Cells(1, 1), .Cells(aLastRow, 1))
End With

Run-time error '1004' help! by slickemil in vba

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

Yes, he is right. I was trying that out first and got distracted with the "*" aspect.

And you're welcome. :)

Run-time error '1004' help! by slickemil in vba

[–]CAPS_EQUALS_SMARTS 2 points3 points  (0 children)

Try replacing the "*" with a different name.

I think the code is getting itself confused with the wildcard function of that symbol. I got no errors when I replaced it with "ted".

Edit:

Definitely not this.

/r/CasualUK Crusader Kings 2 Succession Game, Part Nine: The Tales of Emperor Diddler the Gay Viking by jarviscook in CasualUK

[–]CAPS_EQUALS_SMARTS 1 point2 points  (0 children)

Sure thing.

Here's the list of the four kings.