xlcenter

  1. P

    Passing the HorizontalAlignment property to a Subroutine

    The Font Size and the HorizontalAlignment of Text in various rows will have to be different. So, when the programme moves from one Row to the other I am trying to pass to a Subroutine the Font Size whether 10 or 11 and the Alignment property whether xlCenter or xlLeft. I select a range and I...
  2. I

    Advice for existing code where todays month is entered to a cell

    Morning, I am currently using this code supplied below but i overlooked something when i was applying the code etc. The code takes the current month and enters it into cell B1 on several worksheets within the same workbook. The part i overlooked was that on the 1st day of the month when i...
  3. I

    Recorded macro placed in code shows not supported

    Hi, I have the following working code in use. Private Sub Worksheet_Activate() Range("A3") = UCase(Format(Now, "mmmm")) Range("D3") = Year(Now) Range("A1:E3").HorizontalAlignment = xlCenter Range("A1:E3").VerticalAlignment = xlCenter Range("A1:E30, D31:E31, B35:C37, E35:E37...
  4. I

    Insert new row & apply Ucase

    Hi, Can you advise please the correct way to apply Ucase for when i insert a new row each time at A6:H6 I have this code below but keep getting Run Time Error 13 Private Sub InsertNewRow_Click()Rows("6:6").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Range("A6").Select...
  5. tlc53

    VBA Code - Apply changes on individual basis

    Hi, I was hoping for a bit of help with this VBA code please. What I am trying to accomplish, is a general macro that can be used on each Client sheet (rather than a macro for each individual sheet) that can cope with changing data and it's location (although the data headings will always be on...
  6. J

    VBA Code to Auto Fit Row Height

    How do I modify this code to have Excel grab all used rows and format all row heights to 15.00? Sub Format_Make_Ready_Board() 'Formats columns and rows Cells.Select Selection.Font.Size = 8 Rows("2:2").Select With Selection .HorizontalAlignment = xlGeneral...
  7. J

    VBA Code to Find Last Row

    I have a list of apartment codes (e.g., 87-8703A) in range A2:A8. In cell J2, I used =RIGHT(A2,LEN(A2)-FIND("-",A2,1)) to extract the second part of the apartment code after the dash, giving me 8703A. I then copied the formula down to J8 and did paste special (values) into range A2:A8 and then...
  8. O

    Windows Activate Excel vba/macro

    Hello Everyone. I just recently got upgraded from Excel 2013 to Excel 2016. When I had 2013 version, I built a vba code where I created an Excel workbook instance, posted some data into it via Access vba and then once it is done the code will connect to my Personal.xlsb and run a build in macro...
  9. D

    How to link items from a listbox 1 to items coming from a listbox 2

    Hi all, I'm currently looking the lines of code to link different items coming from 2 different listboxes. Here is my code that allows to, at least, link items of a single list between them: Here is the macro applied to the commandbutton that displays the items of the listbox in an excel...
  10. D

    Automate Structure/organizational chart

    Hi all, My goal is to automate a Structure/organizational chart with different elements included in a listbox (userform) here is my current code on VBA of the command button which display on a excel sheet all the items of the listbox of my userform. Dim i As Long For i = 0 To...
  11. K

    How to move row 9 at the bottom of my report using macro?

    Hi All, I am actually trying to do report by using macro..my problem is that i am actually trying newbie style where i calculate my Grand Total at row 9 then only put this row at the bottom. so now my issue is that how to move the row 9 at the bottom of my data? here is my code Sub...
  12. D

    VBA Run Time Error 424 Object Required

    I have am having trouble with this line in my macro below. Range("J2:J" & LastRow).Value = "=IFERROR(VLOOKUP(H2," & LCase(sh.Name) & "_rate,3,FALSE),"""")" The code is supposed to change the named range in the formula based on the sheet name. I can't figure out why I am getting this error...
  13. S

    Help with Next code

    Hi I'am trying to do this. Have a spreedsheet that have some columns like this the table under here <tbody> <tbody> A B C D E F G H I J K 1 Name Date Finished Name Date Finished Name Date Finished 2 Roy 23.4.2018 x Mette 27.05.2018 Hanne 01.12.2018 3 Mette 27.5.2018 Oskar...
  14. N

    Only update changed cells in variable range triggered by Worksheet_Change

    Hello, I have a sheet that user can update. Columns A, C-G and I-J are text Columns B and H are date format. I force the format to consolas (to see difference between O and 0), set the date cells to yyyy-mm-dd, do some centering and indenting. BUT: I do this inefficiently on all cells from row...
  15. D

    How do I modify this code?

    I need some help with modifying this code as I don't know how to code: <code>Sub addDisclaimer() LastRow = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row rows(LastRow + 1 & ":200").Select Selection.Delete Shift:=xlUp ActiveSheet.PageSetup.PrintArea = "$A$1:$M$" &...
  16. I

    Change Click to Change event advice

    Evening, I currently use this code shown below on a click command button. Private Sub CommandButton1_Click()Dim CustomerName As String Worksheets("DATABASE").Select CustomerName = Range("A6") Worksheets("INFO").Select Worksheets("INFO").Range("CF2").Select If...
  17. K

    How to Auto Fill 2 columns VB Code

    I recorded a Macro and now I'm trying to edit it to auto fill to the last row. this is what i have so far. Thanks Range("C2").Select Range(Selection, Selection.End(xlDown)).Select ActiveWindow.SmallScroll Down:=-234 Application.Run "'ILCHotSheet (v3).xlsx'!BAZINGA_007"...
  18. G

    VBA code from PC to Mac

    Oh boy. So I'm new to VBA entirely and I made a rudimentary inventory program in PC using VBA. I tried it out on Mac and it didn't work at all. I am not even sure where to begin the process of coding it to work for Mac. It's a gift for my Mom so I hope one of y'all is smart enough to point me in...
  19. W

    Inserting text in bottom three rows of each page break of worksheet (without huge IF statement)

    Hi All, Have a couple questions regarding code, here is breakdown. Goal: Insert text in bottom three rows of each page of worksheet without having to write gigantic if statement. Current Situation: We have legal jargon that needs to be added to the bottom of each page of a worksheet...
  20. Small Paul

    Centre Data In Cell Across Worksheet

    Hi I have a massive VBA (eternally grateful to 'Fluff' and 'gallen') which does not centre data in the cells. I have tried recording a macro on a blank workbook and then copy/paste into my VBA. It still does not centre! The code (for this part) is: Range("A1:F500").Select...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top