+ Reply to Thread
Results 1 to 10 of 10

Fill a range of cells

  1. #1
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Fill a range of cells

    In one column I have set of values(A) ranging from 40F to 140F with intervals of 0.5. I have another set of values (B) ranging from 20 to 71 with intervals of 0.1.

    How to fill all values of Set B appears against each value of Set A. (sample data is enclosed).
    Attached Files Attached Files
    Last edited by leo73pk; 10-27-2017 at 02:43 PM. Reason: Solved
    Best Regards,
    Hamza


    It is the greatest of all mistakes to do nothing because you can only do little - do what you can.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Fill a range of cells

    The two sets in your attachment are of different lengths - what you need to show is your EXPECTED results.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Fill a range of cells

    ??? What is your expected answer? This is not clear to me....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Fill a range of cells

    In Set A i have temperature with intervals of 0.5. while in Set B i have various Sp. gravity with intervals of 0.1.

    My requirement is to have all sp. gravity mentioned in Set B appear against each value of Set A.
    e.g against temp 40 all Sp. Gravity appears
    then against temp 40.5 all sp. gravity appears.......

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Fill a range of cells

    SHOW US what you want, please. Mock it up manually and attach it here.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Fill a range of cells

    Do you want the results in one column e.g. 40 - 20 or in two columns?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Fill a range of cells

    Assuming it is 2...

    =INDEX($D$4:$D$204,1+INT((ROWS($1:1)-1)/$G$3))

    to return Set A, and

    =INDEX($E$4:$E$5141,1+MOD((ROWS($1:1)-1),$G$3))

    to return Set B. Copy down for 1,000,000+ rows...
    Attached Files Attached Files

  8. #8
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Fill a range of cells

    Glenn you are right that's what I was looking forward. But the problem is its too much time consuming. moreover please note that i have to apply that formula to 204*511= over 100,000 records. I just copied to 15000 records and its hanging my core i3 machine. Is there any solution to handle this issue.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,116

    Re: Fill a range of cells

    Sadly, probably not. I automatically think OFFSET with these problems. It is slow. Very very slow. INDEX will be much better. If it's no good, you will need VBA. Is that possible?? I will bow out... as i have no VBA. But others do...

  10. #10
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Fill a range of cells

    I'm not much comfortable with VBA. Its fine thanks for your help. Its one time hectic activity i'm copying formula and then pasting that outputs as results.

+ 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] Search Range for NonBlank Cells, Fill Down only one cell below NOT all Blank cells belof
    By safari20WDG in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-07-2017, 01:23 AM
  2. [SOLVED] Fill range of cells based on matches in multiple cells
    By VidOs in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-17-2017, 01:08 PM
  3. Color fill cells in a sum range
    By rwdozier in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2016, 04:43 AM
  4. Skip x cells and fill (Fill/create weekly average from 7 days and fill down)
    By tunafishes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-18-2016, 03:43 AM
  5. Using Range / Array to fill a set of cells
    By penfold1992 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2013, 10:14 AM
  6. color fill in VBA over a range of cells
    By shanebenson in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-18-2010, 06:48 PM
  7. [SOLVED] automatically fill in a range of cells
    By Maarten in forum Excel General
    Replies: 1
    Last Post: 04-29-2005, 07:06 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