+ Reply to Thread
Results 1 to 4 of 4

How to increment values contained in a Variant and to put in a Range

  1. #1
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    How to increment values contained in a Variant and to put in a Range

    This works:

    Please Login or Register  to view this content.
    What I want is (to the effect)
    v = WS_Sales.Range("C93:C105").Value
    v = v * 1.10
    WS_Sales.Range("C80:C92").Value = v

    I do NOT want to loop the elements inside of v - but
    don't see anyway to avoid the issue.

    Is there some other "one and done" approach?

    regards
    John
    Last edited by JohnM3; 06-12-2012 at 09:11 AM. Reason: Bad Heading

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How to increment values contained in a Variant and to put in a Range

    not very nice, but you can put the constant (i.e. 1.1) in a cell and use copy-> paste special multiply on range C80:C92
    IMHO loop is better
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to increment values contained in a Variant and to put in a Range

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Forum Contributor
    Join Date
    12-26-2010
    Location
    Kansas City, Kansas
    MS-Off Ver
    Excel 2007
    Posts
    147

    Re: How to increment values contained in a Variant and to put in a Range

    mikerickson

    Oh My God!

    Perfect!

    I am blown away. And I hope it helps someone else along the way.

    I don't understand it - but I will "get it" - just need some time.

    It is truly - ONE AND DONE.

    **Cannot** thank you enough.

    Also - Buran - thank you for responding to my post.

    regards
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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