+ Reply to Thread
Results 1 to 7 of 7

Insert Cell text in formula VBA

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    18

    Insert Cell text in formula VBA

    Hello everyone,

    I have this formula

    ActiveSheet.Rows("8:8").Hidden = True

    I want to extract the "8:8" from a cell (let's say A1) in the worksheet that contains "8:8" so it would look like this

    ActiveSheet.Rows(Range("A1")).Hidden = True

    Anyone knows the correct form to write that??

    Thank you!!!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Insert Cell text in formula VBA

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-12-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Insert Cell text in formula VBA

    Thank you for your response yudlugar!

    However I've tried that and unfortunately does not work!

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Insert Cell text in formula VBA

    It works for me providing the contents of A1 are actually 8:8 as text (i.e. I typed '8:8 into the cell not just 8:8)
    what happens if you run this macro (what comes up in the messagebox):
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-11-2012
    Location
    bengalur
    MS-Off Ver
    Excel 2003, 2007
    Posts
    152

    Re: Insert Cell text in formula VBA

    Can you please try this

    Activesheet.Rows(Range("A1").Value).hidden = true

  6. #6
    Registered User
    Join Date
    07-12-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Insert Cell text in formula VBA

    All right!!! Yes that was it, my source was "8:8" not 8:8.

    It works just fine now, Thanks!!

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Insert Cell text in formula VBA

    No problem, for reference if you wanted to use "8:8":
    Please Login or Register  to view this content.

+ 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. how to insert text as cell location in formula
    By squidy37 in forum Excel General
    Replies: 3
    Last Post: 12-15-2011, 03:02 PM
  2. Replies: 4
    Last Post: 04-11-2011, 08:41 PM
  3. Insert cell text as part of formula?
    By elazarus in forum Excel General
    Replies: 3
    Last Post: 06-03-2009, 11:24 AM
  4. Insert cell value into text within a formula?
    By Daffs in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-14-2008, 07:35 PM
  5. Replies: 1
    Last Post: 05-31-2005, 10:18 AM

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