Jump to content
Welcome Guest!

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Kirabo

Members
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kirabo

  • Rank
    Newbie 1
  1. Code Tidy Up

    I have recorded a macro to do some operations I need to complete on imported data. It saves me some time and lets the VBA do the tedious bit of the task for me. However, I know that recording macros isnt the most efficient task. Has anyone got any suggestions of how I can tidy this code up? Code: Sub Macro1() ' ' Macro1 Macro ' ' Rows("2:3").Select Selection.Delete Shift:=xlUp Range("A1:M2").Select With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent1 .TintAndShade = 0.399975585192419 .PatternTintAndShade = 0 End With Selection.Font.Bold = True With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlCenter .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Range("A3:M4").Select Selection.Copy Range("A17").Select ActiveSheet.Paste Range("A22").Select Application.CutCopyMode = False ActiveCell.FormulaR1C1 = "=SUM(R[-19]C:R[-1]C)" Range("A22").Select Selection.AutoFill Destination:=Range("A22:M22"), Type:=xlFillDefault Range("A22:M22").Select End Sub Any help would be great Kind Regards Kirabo
  2. Hi

    Welcome to the forum!
  3. VLOOKUP with two Criteria?

    oh wow I didnt know you could concatenate cells in a formula to lookup. Formula works geat Thanks for you help! Repped!
  4. VLOOKUP with two Criteria?

    Does anyone know if it's possible to do a VLOOKUP with two criteria? I have some example data shown below... so basically In column I I need to look up the price in column E, using the values in G4:H4. I can use vlookup with 1 criteria, but not sure how to do it with two! Any help would be appreciated Thanks Kirabo!
  5. ^^ Nice formula, saved it to my repository... looks like something useful
  6. Macro to delete sheets

    Excellent! Saved me some time and certainly some frustration! Works like a charm I like how it gives me the pop-up when if i spell the sheet name incorrectly! Thanks again Caleeco!!
  7. Macro to delete sheets

    Ahh ok, didnt know that! Here I was deleting worksheets 1 by 1 like a fool! Some vba code would be nice, I have hundreds of sheets! so scrolling back and forth isnt so easy. Thanks a lot!
  8. Macro to delete sheets

    Hello All, Was hoping to get some help with a VBA tool. I am testing a macro where I'm creating and deleting a lot of new sheets. However, I need to delete the sheet, I just created in order to re-test my code. Could someone help me write a code that will ask me for a sheet name and then delete all the sheets after and including that sheet? Thanks K
  9. Can't Merge Last used Row

    Spot on! I knew it was something simple haha. Thanks for going into detail with the explanation! I'll keep that in mind in future
  10. Can't Merge Last used Row

    Hello, For some reason I cannot get this small bit of code to work! All i need to do is find the last row of my table, and then merge the next row underneath it. This is what I have so far. LastRow = Cells(Rows.Count, "B").End(xlUp).Row + 1 Range("A" & LastRow :"F" & LastRow).Select Selection.merge What am I doing wrong here?
  11. Hello All

    Hi, I'm fairly new to excel, and its looks like im fairly early to this party In the TOP5 first members! Just came for the Code Snippets LOL, they look useful Kirabo
×