+ Reply to Thread
Results 1 to 12 of 12

How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    34

    How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    0


    I am writing a code to display the properties of a Honda car when a macro button is pressed. However, i could only type fixed Strings like "Honda", "Motorized seats" etc. into the code which is not very flexible.

    I wish to replace "Honda" with the cell value so when i change the value of cell in my worksheet, the code will read the updated cell value and process accordingly.

    Please Login or Register  to view this content.
    Any help or suggestions to improve would be great. Thanks!
    Last edited by trippyninjas; 02-12-2020 at 09:28 AM.

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Like this?
    Avoid using select, it is rarely needed and slows down your code.
    Please Login or Register  to view this content.
    It is always a good idea to post a small example.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-29-2020
    Location
    Kraków, Poland
    MS-Off Ver
    Office 365
    Posts
    10

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Please Login or Register  to view this content.
    Or use '.FormulaR1C1' instead of '.Value' if you need your input to be a formula.

  4. #4
    Registered User
    Join Date
    01-30-2020
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Thank you for the prompt reply! I am trying to do a simple interface where a user can select 2 or more car brands. The program will then compare the selected car's properties and display it here.

    CarProj.xlsm

    What i require now is for the program to automatically read the values from another worksheet instead of me just plain typing their properties into the code. (e.g "Honda", "Motorized seats"). I wonder if that is possible?

    Here is the full code :
    Please Login or Register  to view this content.
    Last edited by Pepe Le Mokko; 01-30-2020 at 09:15 AM. Reason: Code tags added

  5. #5
    Registered User
    Join Date
    01-30-2020
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Is there any way to assign the value of the cell instead of typing Honda? That way when i change the value in the cell then it will be updated automatically.

    for example

    HTML Code: 

  6. #6
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Please Login or Register  to view this content.
    Your attachment failed, try to post a new example, you can use the insert image button to insert any file, also an excel file.

  7. #7
    Registered User
    Join Date
    01-30-2020
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    My apologies. I have updated the post with the excel file. Thank you so much for your help.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,620

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Please use code tags ( the # button) instead of html tags
    HTML tags do not permit scrolling and make posts hard to read
    Thanks

  9. #9
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    I forgot, welcome on excelforum
    Why did you use toggle buttons?

    Something like this?
    CarProj.xlsm

  10. #10
    Registered User
    Join Date
    01-30-2020
    Location
    Germany
    MS-Off Ver
    Excel 2016
    Posts
    34

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Wow thanks! That is exactly what i need. Could you also help me edit the code to which under the Combined column will display the selected cars properties. (e.g Motorized seats, Grip wheels, Drop top) <-- when all 3 buttons are pressed?

  11. #11
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Do you mean that you want the car properties of the car that has the highest speed?

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,777

    Re: How do i assign “ActiveCell.FormulaR1C1” to read a cell value instead typing it?

    Quote Originally Posted by dotchiejack View Post
    Something like this?
    Attachment 660335
    For the benefit of all, please share the code used in your post as well as attaching a workbook. Thanks.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] Variable in ActiveCell.FormulaR1C1?
    By russwongg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-18-2016, 10:56 PM
  2. what is the activecell.FormulaR1C1 method
    By kisanvikas2015 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2015, 06:30 AM
  3. Customize ActiveCell.FormulaR1C1
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2013, 10:46 PM
  4. Concatenating literal, with ActiveCell and FormulaR1C1
    By LydiasDad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2011, 06:40 PM
  5. ActiveCell.FormulaR1C1 Dynamic Row
    By goldenbear10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2009, 04:47 AM
  6. SumIf in ActiveCell.FormulaR1C1 ?
    By RitaP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2006, 02:20 PM
  7. [SOLVED] ActiveCell.FormulaR1C1 Sum Function
    By mb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-29-2005, 07:05 PM

Tags for this Thread

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