+ Reply to Thread
Results 1 to 13 of 13

Batch add additional calculation to a function while maintaining cell

  1. #1
    Registered User
    Join Date
    08-20-2020
    Location
    Myhome
    MS-Off Ver
    Microsoft Office 2007
    Posts
    5

    Exclamation Batch add additional calculation to a function while maintaining cell

    Hello,
    This is my 1st post!

    I have A1 cell with function ='c:\1\[1.xls]Α'!A1

    This function exists in 10.000 corresponding cells.

    I want to add +'c:\2\[1.xls]Α'!A1

    How can I batch add to every 9.999 cells with the corresponding cell for a final result like below:

    A1 cell -> ='c:\1\[1.xls]Α'!B1+'c:\2\[1.xls]Α'!B1
    .
    .
    .
    K222 cell -> ='c:\1\[1.xls]Α'!K222+'c:\2\[1.xls]Α'!K222

    Thanks in advance for your reply!
    Last edited by lithos_g; 08-20-2020 at 03:05 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    Hi,

    This should do as you need:

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    08-20-2020
    Location
    Myhome
    MS-Off Ver
    Microsoft Office 2007
    Posts
    5

    Re: Batch add additional calculation to a function while maintaining cell

    Thanks!

    How can I also make the same for multiple worksheets in my workbook?

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    You could loop through the sheets and run the above code on each sheet...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-20-2020
    Location
    Myhome
    MS-Off Ver
    Microsoft Office 2007
    Posts
    5

    Re: Batch add additional calculation to a function while maintaining cell

    Thanks for the help!

    I tried to run it but it returns an error at the line 12 rCell.....
    It says "object variable or with block variable not set"

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    Ah sorry. The code was unchecked.

    Please Login or Register  to view this content.
    If that doesn't work could you please post a sample of your workbook?

  7. #7
    Registered User
    Join Date
    08-20-2020
    Location
    Myhome
    MS-Off Ver
    Microsoft Office 2007
    Posts
    5

    Re: Batch add additional calculation to a function while maintaining cell

    I just found out that inside "+'c:\2\[1.xls]A'!" is does not accept Greek characters like that "+'c:\2\[έγραφο.xls]A'!"

    If I run the script as you posted it, it works though!

  8. #8
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    Not an issue I've worked with previously, sorry. I do think you'll need to take a look at the ChrW() function though.

    Good luck!

  9. #9
    Registered User
    Join Date
    06-29-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Batch add additional calculation to a function while maintaining cell

    Stupid question and sorry for using this post, but how do i create a new issue?

  10. #10
    Registered User
    Join Date
    08-21-2020
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    30

    Re: Batch add additional calculation to a function while maintaining cell

    Don't worry i figured it out

  11. #11
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    @Blackandw60427, Click "Forum" just under the site banner at the top of the page, click the appropriate forum for your question, then click "post new thread"

  12. #12
    Registered User
    Join Date
    08-20-2020
    Location
    Myhome
    MS-Off Ver
    Microsoft Office 2007
    Posts
    5

    Re: Batch add additional calculation to a function while maintaining cell

    Dear Sweep,
    I found a better way to "read" the position of a cell, so I don't have problem if its A01 or A1222!
    I used this code below:

    Please Login or Register  to view this content.
    So it starts reading after "!" and stops reading before "+" and then its stored at cellNum

    Don't you think its better?

  13. #13
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Batch add additional calculation to a function while maintaining cell

    If it works for you, it's good!

+ 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] Additional calculation providing both conditions are met
    By Alfie092 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-22-2020, 10:25 AM
  2. Calculate Between Two Times With Additional If Calculation
    By StokieWorm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2017, 09:24 AM
  3. Replies: 0
    Last Post: 06-19-2012, 11:36 AM
  4. [SOLVED] COUNTA calculation - Formula in cell refers to arange with additional numbers adjacent?
    By hennakao in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-27-2012, 07:07 AM
  5. Excel 2007 : Deleting Duplicates WHILE maintaining additional columns
    By bioinformatics_guy in forum Excel General
    Replies: 0
    Last Post: 03-02-2011, 12:56 PM
  6. cell ref in function formula change when inserting additional colu
    By STAR263 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2006, 06:10 PM
  7. [SOLVED] additional month calculation
    By BorisS in forum Excel General
    Replies: 6
    Last Post: 12-13-2005, 02:30 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