+ Reply to Thread
Results 1 to 4 of 4

Return value based on the fact if cell is full or not

  1. #1
    Registered User
    Join Date
    09-25-2018
    Location
    Riga
    MS-Off Ver
    2016
    Posts
    2

    Return value based on the fact if cell is full or not

    Hi,

    Please see screenshot before description:

    Capture.PNG

    I have prefilled Month column but instead of manual prefill, it should hold formula/solution. The solution should look at the lower table and see, that for jan column there are two values, so jan needs to repeat twice in the upper table and so on for the rest of the months. How to do it?

    In the beginning I was thinking of using approximate HLOOKUP. Count the values in each month's column and add result to the previous column. So the value for jan would be 2, for feb ir would be 3 because 2+1=3. Then along the month column of upper table have and "index" column that is used as "what to hlookup column" and based on approximate match, find value. That doesn't work though because two things: I don't know what to do with "empty" month in the lower table and if index column from 1 to whatever holds a number that isn't in the list of values for lower table, it will still be looked up based on approx. match which is the solution and the problem at the same time.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Return value based on the fact if cell is full or not

    It is impossible to see what is where from a picture. In the absense of a sample workbook, I've had to make a few assumptions.

    With 'Jan' in the bottom table in your picture located in I1 (so 40 for May would be in M2), enter the following formula into A2, then fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and this one in B2, then fill down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Return value based on the fact if cell is full or not

    I would look at the below link and adapt
    https://www.extendoffice.com/documen...e-x-times.html

    use hlookup instead of vlookup

  4. #4
    Registered User
    Join Date
    09-25-2018
    Location
    Riga
    MS-Off Ver
    2016
    Posts
    2

    Re: Return value based on the fact if cell is full or not

    Thank you to both answer posters! The second solution is along the lines of my thinking, just couldn't figure out the details.

+ 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. Perform search & return complete text out of a range but not the full cell content
    By aguilarpro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-25-2017, 02:43 PM
  2. [SOLVED] Type in an abbreviation and have cell return a full value. Is there a way to do this?
    By PaddyP in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-18-2016, 07:52 PM
  3. Return a full line of data based on multiple criteria
    By ashy2287 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-11-2016, 06:41 PM
  4. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  5. Return full row from drop down or similar.
    By egcca in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-26-2008, 08:03 PM
  6. [SOLVED] Round(cell,0) after the Fact
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2006, 02:45 PM
  7. Replies: 1
    Last Post: 04-24-2006, 05:35 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