+ Reply to Thread
Results 1 to 3 of 3

Macro to search multiple (static) columns and perform calculation on adjacent cells

  1. #1
    Registered User
    Join Date
    09-15-2013
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro to search multiple (static) columns and perform calculation on adjacent cells

    Hi Team,

    While not an excel-fu-master, I have managed to program a couple of macros with help from forums like this and now I am reaching out for something a little more complex.

    I have a large number of worksheets, with thousands of rows of data which need a macro run through them to find specific information and carry out a formula on adjacent cells.

    Essentially I have a Purchase order sheet which some of the values are in my own currency, but a good number of them are not. The amounts in a different currency need to be converted (through a simple formula - which will remain constant).

    Here is a quick breakdown in Column K, I will be looking for a certain text value "USD" and "EUR", on the same row, but to the left (offset -2) is a number (currency, 2 decimals, no symbol). This number (in Column I) needs to have a multiply performed on the value in that cell to get my currency. Then once again another formula needs to be run on the resulting value on the same row with the value adjacent (column H) with the result being displayed on column J. The final part of the macro will then replace the term "USD" or "EUR" with the abbreviation for my currency.

    I have tried to complete this manually using filter etc, but when copying the formula it messes with rows in between the various cells where the formula is conducted.

    Any help would be appreciated....

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Macro to search multiple (static) columns and perform calculation on adjacent cells

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-15-2013
    Location
    Dubai
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to search multiple (static) columns and perform calculation on adjacent cells

    Ok as requested here is an attachment (Sample) of a work sheet. You will notice that there are AED amounts in the various currency columns, I would like a macro to search through all the columns with currency, find the other currencies (USD and EUR) and then perform a calculation as listed in the first post above.

    Once again any help would be appreciated...
    Attached Files Attached Files

+ 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. Search for multiple words in range of cells...answer in adjacent cell
    By TheDudestMonk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-13-2013, 07:49 AM
  2. [SOLVED] Select multiple independent cells and perform a calculation
    By mtsykes28 in forum Excel General
    Replies: 18
    Last Post: 07-06-2012, 06:38 AM
  3. Macro to enter calculation in cells adjacent to cells with values?
    By Samba1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2010, 03:20 PM
  4. assist with search macro for adjacent cells
    By karl0709 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2010, 08:06 PM
  5. [SOLVED] comparing two columns & then perform a calculation
    By dazp1970 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2005, 09:05 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