Results 1 to 4 of 4

Thread: Excel formula question

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Excel formula question

    Anyone know if i can use the lower formula with a range of cells? Im at work now and i have a huge workbook that i need to convert too all lowercase. The lower formula seems to only be able to be applied to one cell. . Thanks.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Excel formula question

    i tested this on a small worksheet, do convert the whole sheet to lower case
    VB Code:
    1. Dim mysheet As Worksheet, rng As Range, cell As Range, r, c
    2. Sheets("Sheet1").Activate
    3. Set mysheet = Sheets("Sheet1")
    4. myrow = mysheet.Cells.SpecialCells(xlCellTypeLastCell).Address 'last row
    5. mycell = "a1:" & myrow
    6.         On Error Resume Next
    7. Set rng = mysheet.Range(mycell)
    8.  
    9. For r = 1 To rng.Rows.Count
    10.     For c = 1 To rng.Columns.Count
    11.         Set cell = rng.Cells(r, c)
    12.         Debug.Print cell.Address
    13.         cell.Value = LCase(cell.Value)
    14.     Next
    15. Next

    pete

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Excel formula question

    Looks like you can specify a range for the formula but it returns the #Name error.
    =LOWER(A1:M40)

    You get the blue outline range indicator but doesnt work.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Re: Excel formula question

    Yeah i just gave up on it. The auto complete kept adding existing entries in caps so i had a mixture of caps and non capped cells. My boss told me to just forget about it and email it to this dude. Excel kept yelling about having a circular reference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width