+ Reply to Thread
Results 1 to 8 of 8

Pull field based on other other fields criteria

  1. #1
    Registered User
    Join Date
    08-23-2018
    Location
    Houston, Texas
    MS-Off Ver
    365
    Posts
    78

    Pull field based on other other fields criteria

    Hello all,


    Need a little assistance here. What I am trying to achieve is have the premium (column C) pulled into the corresponding fields based on the start date which would be the sale date (column A) and then pull it X amount of times which is what column B signifies.

    I added a sample file. For example in the first instance (row 3) we have the sale date be 12/2022 for 24 months . So I pulled the premium on that date for 24 months but in row 8 we have it starting in 2/2023 for 21 months so I needed it to start on that date for 21 months which I did manually. Gauging if there is an easier way to get this done? TIA!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    114

    Re: Pull field based on other other fields criteria

    May be this work

    put this formula in cell d3 and drag
    =IFERROR(IF(COLUMNS($D$1:D1)>=MATCH(TEXT($A3,"mmm-yyyy"),TEXT($D$2:$AB$2,"mmm-yyyy"),0),IF(COLUMNS($D$1:D1)<26,$C3,""),""),"")

  3. #3
    Forum Contributor
    Join Date
    01-07-2025
    Location
    Iran
    MS-Off Ver
    2021
    Posts
    137

    Re: Pull field based on other other fields criteria

    Paste this formula in cell D3 and drag it:

    PHP Code: 
    =IF(AND($B3>0,DATE(YEAR($A3),MONTH($A3),1)<=DATE(YEAR(D$2),MONTH(D$2),1),DATE(YEAR($A3),MONTH($A3),1)+$B3*30>=DATE(YEAR(D$2),MONTH(D$2),1)),$C3,""
    Last edited by MiNd_HuNT3r; 02-12-2025 at 04:05 PM.

  4. #4
    Registered User
    Join Date
    08-23-2018
    Location
    Houston, Texas
    MS-Off Ver
    365
    Posts
    78

    Re: Pull field based on other other fields criteria

    Thanks, The date aspect seems to work but if i drag it across it does fill in every cell even when the cell should have a 0. For example row 4 should only have 2 months of premium and the rest should be 0, but if I drag it across it feels it all in. Same concept for the first row. If I drag it past 25 month it should be 0 since its for 24 months but it feels in the premium for the 25th month as well

  5. #5
    Forum Contributor
    Join Date
    01-07-2025
    Location
    Iran
    MS-Off Ver
    2021
    Posts
    137

    Re: Pull field based on other other fields criteria

    I rechanged it. so use the new formula

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,672

    Re: Pull field based on other other fields criteria

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 02-12-2025 at 04:54 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  7. #7
    Registered User
    Join Date
    08-23-2018
    Location
    Houston, Texas
    MS-Off Ver
    365
    Posts
    78

    Re: Pull field based on other other fields criteria

    Thank you, i think this did it!

  8. #8
    Forum Contributor
    Join Date
    01-07-2025
    Location
    Iran
    MS-Off Ver
    2021
    Posts
    137

    Re: Pull field based on other other fields criteria

    You're welcome and thanks for the rep

+ 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. Calculated fields based on the count of a field
    By FernTurpin in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-08-2019, 10:07 AM
  2. access SQL to pull all fields in a table and group them based on their ID
    By ewong in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2012, 05:18 PM
  3. Replies: 3
    Last Post: 10-01-2012, 11:38 AM
  4. Replies: 5
    Last Post: 08-05-2010, 01:40 PM
  5. Pull 5 values into fields based on code name
    By sabes35 in forum Excel General
    Replies: 7
    Last Post: 07-26-2010, 07:50 PM
  6. How to add Boolean field based on other fields
    By m0use in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-22-2009, 01:14 PM
  7. [SOLVED] populate fields based upon pull down lists
    By John in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2006, 05:45 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