+ Reply to Thread
Results 1 to 17 of 17

Range of specific cell

  1. #1
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Range of specific cell

    Hi guys,

    Hope you can help me with this.

    What i wanted to do is add data to a specific cell, i.e. I want to start inputting data to cell A5 until the last row.

    Help me modify this code.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by asilocyra; 08-18-2017 at 01:18 AM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Range of specific cell

    Hi asilocyra,

    It sounds like you want to enter things into a cell and when you press enter the cursor goes to the next cell on the right instead of down. There is a setting in File -> Options -> Advanced -> Edit Options where you can change the direction of the cursor after pressing enter. If this isn't what you want, then keep asking. No VBA needed for this setting.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Hi MarvinP,

    I've uploaded my workbook, please take a look to see what I mean.
    Thank you.
    Last edited by AliGW; 08-18-2017 at 01:55 AM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Range of specific cell

    Quote Originally Posted by asilocyra View Post
    What i wanted to do is add data to a specific cell, i.e. I want to start inputting data to cell A5 until the last row.
    Please make it more descriptive. Unable to understand your requirement from attached file


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Sorry about that.

    From my attached file, after the row count with filled color it puts the Total Count in cell E to last row.
    But what I wanted to happen is put the RowCount in Cell A5 until the last row. Does this explains it?
    Sorry, I'm not good in explaining.
    Last edited by AliGW; 08-18-2017 at 01:54 AM. Reason: Unnecessary quotation removed.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Range of specific cell

    It needs to be
    Please Login or Register  to view this content.
    instead of

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  7. #7
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Tried that but it has an error.
    Run time error 1004
    Application defined or object defined error
    Last edited by AliGW; 08-18-2017 at 01:53 AM. Reason: Unnecessary quotation removed.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Range of specific cell

    Test your own example file.
    Attached Files Attached Files

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Range of specific cell

    Hi asilocyra,

    Color isn't data. If you want to count the number of cells that are colored in each column, you need to have some number or letter in those cells that ARE data that excel can count.

    I think I've found a VBA answer for you at:
    https://www.ablebits.com/office-addi...y-color-excel/

    See if that is the code you are looking for.

  10. #10
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Quote Originally Posted by bakerman2 View Post
    Test your own example file.
    Awww, my bad.
    Gonna reupload my work.
    Last edited by asilocyra; 08-18-2017 at 01:17 AM.

  11. #11
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Quote Originally Posted by bakerman2 View Post
    Test your own example file.
    Reuploaded my file.
    The "Column Name" shouldn't be in the A4 cell, my bad. Sorry.

  12. #12
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Quote Originally Posted by MarvinP View Post
    Hi asilocyra,

    Color isn't data. If you want to count the number of cells that are colored in each column, you need to have some number or letter in those cells that ARE data that excel can count.

    I think I've found a VBA answer for you at:
    https://www.ablebits.com/office-addi...y-color-excel/

    See if that is the code you are looking for.
    Thanks, appreciated it.
    But after reading it not what I wanted to happen.

  13. #13
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Range of specific cell

    Like this then.

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    07-10-2017
    Location
    Philippines
    MS-Off Ver
    MS OFFICE 2016
    Posts
    38

    Re: Range of specific cell

    Wow! Thank you! This saved me!
    Added rep already.
    Last edited by AliGW; 08-18-2017 at 01:52 AM. Reason: Unnecessary quotation removed.

  15. #15
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Range of specific cell

    You're welcome and thanks for rep+.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,421

    Re: Range of specific cell

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  17. #17
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Range of specific cell

    double-posted by me
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. VBA Macro: Copy and Paste Specific Row Range based on the Specific Value in a Cell.
    By SolidSmoke in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-10-2016, 02:40 PM
  2. Concatenate Cell Value by specific range and specific data
    By ivhysenbelli in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2016, 12:04 PM
  3. VBA to automatically change specific cell value to active cell in specific range
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2016, 04:53 PM
  4. For EACH cell in specific range meeting specific criteria, call a sub
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-02-2014, 03:00 PM
  5. [SOLVED] Copy worksheet with specific name and no blank cell in a specific range
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-05-2013, 11:50 AM
  6. [SOLVED] how to stop Command button If specific number is entered in a specific cell range
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2013, 05:10 AM
  7. Selecting specific cell if score falls within specific range
    By Rennier in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-12-2008, 02:22 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