+ Reply to Thread
Results 1 to 7 of 7

help macro to select used range

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    5

    help macro to select used range

    hi all

    Please help me. i have intention to advance filter based on unique data but it can't work because blank cell. is there a macro to select only used range???
    and how to sum each amount. Data is attached.
    Thank you very much for your help
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: help macro to select used range

    Sheets("SheetName").UsedRange

    The sum bit you can use a pivot table, sumif, you can use a filter with blanks, these show as blanks in the drop down.

    I'd suggest looking at how to use excel rather than macros for this and that. Macros do what Excel does, you dont need a macro for this, you just dont know how to do it in Excel.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    09-03-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    5

    Re: help macro to select used range

    Thx sir, i try this formula but can't work

    anything wrong??

    Worksheet("Sheet1").Activate
    Range("C:C").UsedRange


    Actually ill prefer use excel but practically there are so much data in various workbook to consolidated in my workplace. every month i have new entrys so i need to reinput data. usually it takes 3 hours to finish it. so i decide to learn about macro and try to develop my report. im sorry if i wrong. im not experienced with macro.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: help macro to select used range

    You havent done it right, Sheets("SheetName").UsedRange so sheets("Sheet1").usedrange

  5. #5
    Registered User
    Join Date
    09-03-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    5

    Re: help macro to select used range

    yes sir. this macro select all data.
    what i mean is how to select used range in coloumn D after that skip all blank cell then use adv filter for unique
    . as the result i have Currency that i used for next process

  6. #6
    Registered User
    Join Date
    09-03-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    5

    Re: help macro to select used range

    yes sir. this macro select all data.
    what i mean is how to select used range in coloumn D after that skip all blank cell then use adv filter for unique
    . as the result i have Currency that i used for next process

  7. #7
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: help macro to select used range

    Sheets("SheetName").UsedRange so sheets("Sheet1").usedrange .column(4) where 4 is the column number so if your data starts at B, it would be 3.

    Do some reading on the F1 help for used range etc.

  8. #8
    Registered User
    Join Date
    09-03-2014
    Location
    Indonesia
    MS-Off Ver
    2007
    Posts
    5

    Re: help macro to select used range

    thx for your help !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to automatically select a range
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2014, 06:55 AM
  2. [SOLVED] Highlight range of cells - run macro - select last cell in range
    By chromachem in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2012, 11:46 AM
  3. [SOLVED] select a range in a macro
    By Andrew in forum Excel General
    Replies: 3
    Last Post: 05-10-2006, 03:50 PM
  4. Range Select Macro
    By Archie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-25-2006, 05:00 PM
  5. Macro Help for SELECT RANGE
    By bludovico in forum Excel General
    Replies: 0
    Last Post: 05-11-2005, 01:48 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1