+ Reply to Thread
Results 1 to 7 of 7

Multiply with cell value for each matching sheetname in a list

  1. #1
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Multiply with cell value for each matching sheetname in a list

    Hi,

    I have a dynamic list of worksheet names in range AC15:AC115 in sheet "Kalkyl".
    In range AA15:AA115 in the same sheet, the user can input a number value.

    I want the user to be able to multiply the specific value they input in AA15:AA115 with range B8 to the lastrow in each corresponding sheet.

    So for instance, AA17 = 8. Multiply each value in B8 to the lastrow with 8 in the sheetname matching the value in AC17.

    Is this possible?

  2. #2
    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: Multiply with cell value for each matching sheetname in a list

    Sounds like a good task for event handler of worksheet_change event

    In the sheet code in
    Please Login or Register  to view this content.
    one shall check if Target is in AA column and then use target.offset(0,2) (or each cell in target offseted laet as name of sheet where this simple myltiplying will occur
    Last edited by Kaper; 12-08-2014 at 01:38 PM. Reason: edited bold 2 - my misunderstanding that sheet names are on the left of inserted values
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Re: Multiply with cell value for each matching sheetname in a list

    Quote Originally Posted by Kaper View Post
    Sounds like a good task for event handler of worksheet_change event

    In the sheet code in
    Please Login or Register  to view this content.
    one shall check if Target is in AA column and then use target.offset(0,-1) (or each cell in target offseted laet as name of sheet where this simple myltiplying will occur
    You are right, this would be great with event handler. The problem is I have no Idea how to match a cell value with a worksheet name.
    Could someone help me with the code?

  4. #4
    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: Multiply with cell value for each matching sheetname in a list

    dummy version could be
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Re: Multiply with cell value for each matching sheetname in a list

    Quote Originally Posted by Kaper View Post
    dummy version could be
    Please Login or Register  to view this content.
    Works great! Thanks!

  6. #6
    Registered User
    Join Date
    08-04-2014
    Location
    Stockholm
    MS-Off Ver
    2013
    Posts
    58

    Re: Multiply with cell value for each matching sheetname in a list

    Quote Originally Posted by Kaper View Post
    dummy version could be
    Please Login or Register  to view this content.
    I would like to use this as a normal sub routine instead, how can I adjust the code?

  7. #7
    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: Multiply with cell value for each matching sheetname in a list

    Try the following code in standard module, not in sheet code (while in the spreadsheet press Alt+F11 Alt+I M):
    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. [SOLVED] Cell = sheetname get values from sheetname
    By soli004 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2014, 10:00 AM
  2. Macro to multiply a series of numbers by -1 if target cell matches a list
    By ameinfrank in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2013, 04:25 PM
  3. Using Sheetname in Vlookup as the sheetname for the array to lookup
    By OhioHsSport in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2013, 09:18 PM
  4. Change Sheetname in formulae based on list
    By Peterkling in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-20-2012, 06:18 AM
  5. Drop Down List ... Navigation to a Sheetname
    By atech in forum Excel General
    Replies: 7
    Last Post: 12-02-2007, 06:55 PM

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