+ Reply to Thread
Results 1 to 8 of 8

If cell is in range update formula in another column

  1. #1
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    If cell is in range update formula in another column

    Hi setting help of someone

    In my active worksheet column B
    I have numbers like from 10,000 tu 70000

    If my b column is greater than 39000 and less than 60000 then I need formula on column G

    The formula is mid function of column D
    MID(RC[-4],9,5

    If the results of column G is "0000" then need to filter those rows copying from B2 to G
    And paste in new worksheet

    I tried with below code but getting error.
    Please Login or Register  to view this content.
    Seeking help to create VBA code
    Last edited by ayyappan80; 07-23-2020 at 10:59 AM.

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

    Re: If cell is in range update formula in another column

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: If cell is in range update formula in another column

    @ayyappan80, it is easier to get an answer if you attach a workbook with before and after results shown. This will answer such things as is the new worksheet to be created by the macro or are the filtered results copied to a pre-existing sheet

  4. #4
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141
    Quote Originally Posted by nigelog View Post
    @ayyappan80, it is easier to get an answer if you attach a workbook with before and after results shown. This will answer such things as is the new worksheet to be created by the macro or are the filtered results copied to a pre-existing sheet


    Hi Negilog

    Thanks. Results to be copied in sheet2

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: If cell is in range update formula in another column

    You're not exactly helping yourself here

    Utilise this
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: If cell is in range update formula in another column

    Hi nigelog

    Code is working as expected. Thank you so much for your help. Apologies for not attaching sample workbook, surely will consider in future posts.

  7. #7
    Forum Contributor
    Join Date
    12-18-2019
    Location
    chennai
    MS-Off Ver
    excel 2010
    Posts
    141

    Re: If cell is in range update formula in another column

    Hi Nigelog

    is it possible to exclude number "22000" and "48000" on the below line. Sorry for this additional

    Please Login or Register  to view this content.

  8. #8
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: If cell is in range update formula in another column

    Not tidy but should do --- I deleted workbook i mocked up

    Please Login or Register  to view this content.
    thanks for feedback and rep and for marking as solved
    Last edited by nigelog; 07-24-2020 at 10:50 AM.

+ 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. VBA: How to copy column range to another column using formula in 1 cell?
    By rcurious in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2020, 12:53 PM
  2. Replies: 4
    Last Post: 07-10-2020, 12:53 PM
  3. [SOLVED] Update Cell Range when Copy/Pasting Formula
    By BlueMoon1234 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-06-2020, 09:23 AM
  4. Replies: 2
    Last Post: 12-20-2019, 11:56 AM
  5. [SOLVED] Find non blank cell in a column (range Specified) and insert formula to other cell in same
    By jpbisani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2018, 06:11 AM
  6. [SOLVED] Formula Generation: Search column range, display cell from different column.
    By Old4xford in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-31-2014, 11:30 AM
  7. Maintain an update column for each cell update
    By cybersphere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2007, 10:28 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