+ Reply to Thread
Results 1 to 3 of 3

How to assign number in a cell as the value of the variable

  1. #1
    Registered User
    Join Date
    10-24-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    0

    How to assign number in a cell as the value of the variable

    I am extremely new to VBA so sorry if this is a basic question. But I'm trying to take the number in a cell in workbook 2 and assign it as the value of a variable named PW_Cost and then set the value of a cell in workbook 1 as PW_Cost / 1,000,000.

    In a perfect world £622,000 in workbook 1 will become £0.6m in workbook 2 <<*ending like that would be amazing but if that's not possible then it just being as £0.6 would be fine. I've got the code for opening workbook 2 and activating the right sheet..but that's as far as I've got. Any help will be greatly appreciated!

    Thanks!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello ThAr201,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: How to assign number in a cell as the value of the variable

    You can achieve such displaying just with formatting. But here is just the Hello...Introduce yourself sub-forum and merit discussions shall be located on merit sub-forums
    Best Regards,

    Kaper

+ 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. Replies: 2
    Last Post: 07-24-2012, 11:47 AM
  2. Assign number to variable in VBA?
    By Jalupeno104 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2009, 11:49 AM
  3. How do I assign a text value to a variable number of rows?
    By Don Guillett in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 09-06-2005, 07:05 AM
  4. [SOLVED] How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. How do I assign a text value to a variable number of rows?
    By Jday in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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