+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] FormulaR1C1 in Case statement?

  1. #1
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    [SOLVED] FormulaR1C1 in Case statement?

    Hello everyone

    I have the following code:

    Please Login or Register  to view this content.
    This assigns a static formula (=$Q$1) to each cell in column C (starting in C2) if the cell in column A has "John".

    However, say I want instead for the formula to pick up a value in column B. So C2 would have the formula =B2*$Q$1 , C3 would be =B3*$Q$1, C4 would be =B4*$Q$1 , and so on , is there a way to modify the code to do this?

    Any help would be much appreciated!
    Last edited by uberathlete; 06-17-2016 at 03:05 PM.

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: FormulaR1C1 in Case statement?

    Try:-
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-27-2005
    Posts
    177

    Re: FormulaR1C1 in Case statement?

    Thank you for your reply MickG. This gives the correct end result, but the formula shows the actual value.

    Can that be modified so that the cell reference shows? So instead of =Actual value in B*$Q$1$ , it will say =B(x)*$Q$1 instead?

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

    Re: FormulaR1C1 in Case statement?

    How about

    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.

+ 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] i have an if then statement that works, how to make it work as a with or case statement
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2016, 03:34 PM
  2. [SOLVED] Using IF Statement With .FormulaR1C1
    By Gard5096 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2013, 04:50 PM
  3. Replies: 5
    Last Post: 07-19-2012, 02:53 AM
  4. A better Case (was "Create Loop with Case statement")
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2009, 12:55 PM
  5. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 PM
  6. Switch(case) statement(enhanced if statement)
    By zapopaul in forum Excel General
    Replies: 6
    Last Post: 10-24-2008, 06:53 PM
  7. Case:If Statement
    By yogesh7980 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-14-2007, 08: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