+ Reply to Thread
Results 1 to 40 of 40

Help Please For Formula Copy Skipping Cells?

Hybrid View

  1. #1
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Help Please For Formula Copy Skipping Cells?

    Hi,

    I'm a bit stuck, there must be an easier way to do this, have a formula as follows:
    =IF('Full Survey'!C31="","",'Full Survey'!C31)

    It refers to another tab which contains data I want to retrieve and show on a summary but the data is every 27 rows so it's like this...
    B3 =IF('Full Survey'!C31="","",'Full Survey'!C31)
    B4 =IF('Full Survey'!C58="","",'Full Survey'!C58)
    B5 =IF('Full Survey'!C85="","",'Full Survey'!C85)
    B6 =IF('Full Survey'!C112="","",'Full Survey'!C112)

    etc etc for 80 rows

    I need to do this 80 times and I've been manually amending it as copy or dragging it down doesn't continue the pattern...any ideas please?

    Many Thanks!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    See if this will get tou started...

    =INDIRECT("'Full Survey'!C"&ROW(A1)*27)

    (you may need to fiddle with ROW(A1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    Quote Originally Posted by FDibbins View Post
    See if this will get tou started...

    =INDIRECT("'Full Survey'!C"&ROW(A1)*27)

    (you may need to fiddle with ROW(A1)
    Thanks...not sure what it relates to though? is A1 relating to B3 or the Full Survey Tab?

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    What is the 1st cell that holds the formula?

    We can use that cell as the "counter".
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41
    Quote Originally Posted by Tony Valko View Post
    What is the 1st cell that holds the formula?

    We can use that cell as the "counter".
    B3 is the first cell containing the formula

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    Quote Originally Posted by PJC2013 View Post
    B3 is the first cell containing the formula
    OK, replace ROW(A1) with ROWS(B$3:B3).

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    ROW(A1) is just a counter, it is not actually referencing anything...

    ROW(A1)=1
    ROW(A2)=2
    etc
    so...
    1*27
    2*27
    etc

  8. #8
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41
    Quote Originally Posted by FDibbins View Post
    ROW(A1) is just a counter, it is not actually referencing anything...

    ROW(A1)=1
    ROW(A2)=2
    etc
    so...
    1*27
    2*27
    etc
    Thanks, i'll try it again and let you know. Should this ten replace my IF function?

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    No, you would build that into your formula...
    =IF(INDIRECT("'Full Survey'!C"&ROW(A1)*27)="","",INDIRECT("'Full Survey'!C"&ROW(A1)*27))

  10. #10
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    This formula works but not sure what the next should be

    =IF(INDIRECT("'Full Survey'!B"&ROWS(B3:B3)*31)="","",INDIRECT("'Full Survey'!B"&ROWS(B3:B3)*31))

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    I have two sheets the first is called Full Survey, this contains 80 pages
    waits, Im confused

    Do you mean you have 2 files, with 80 tabs each? Or, what do you mean by pages?

  12. #12
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    Quote Originally Posted by FDibbins View Post
    waits, Im confused

    Do you mean you have 2 files, with 80 tabs each? Or, what do you mean by pages?
    The first tab 'Full Survey' effectively contains a questionnaire that has been repeated 80 times on the one tab, each repetition has been formatted to be one page when printed. I cant amend this tab.

    I'm summarising one question onto a separate tab into a table, which has 80 rows (one for each questionnaire). The summary table starts in cell B3 and relates to cell B4 of the full survey, then cell B4 relates to B31 of the full survey and B5 relates to cell B58 etc etc
    Last edited by PJC2013; 07-13-2015 at 01:51 PM.

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    aahh ok, gotcha

    If this works...
    =IF(INDIRECT("'Full Survey'!B"&ROWS(B3:B3)*31)="","",INDIRECT("'Full Survey'!B"&ROWS(B3:B3)*31))

    Then adjust it to this...
    =IF(INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*31)="","",INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*31))
    and copy down

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    If the data being returned is TEXT then you can shorten it to:

    =T(INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*31))

  15. #15
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    It looks like the *31 relates to the row of the full survey page?
    So for the formula to work the first line of summary needs to be *4 then the second row needs to be *31 as it's 27 rows further down. This makes the copy down relate to the same cell as the previous row, so although the range expands (B$3:B4) the reference is picking up the same cell i.e. cell 31.

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    When you copy the formula down a column the references will evaluate to:

    B3: 'Full Survey'!B31
    B4: 'Full Survey'!B62
    B5: 'Full Survey'!B93
    B6: 'Full Survey'!B124
    etc
    etc

    Is that not the interval you want?

  17. #17
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    That is the interval but the *31 number remains the same and it doesnt evaluate the 27 row jump.

    I've attached a sample file, it's lost some formatting but I hope you can see what I'm trying to achieve on the summary page.

    Thanks for your help with this!
    Attached Files Attached Files

  18. #18
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    Sorry, I can't download the file. I have download size limits.

    The row interval is 31. How is 27 related?

  19. #19
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    the row interval is 27, but the data to be returned starts on row 4, so it should look at rows 4 then + 27 to row 31. But if *27 is entered it doesnt work, the formula needs to be *31 to work but it doesnt copy down it just returns the same value and not the next one in the sequence.

    This one works but returns the value in cell B31
    =IF(INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*31)="","",INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*31))

    This returns cell B27
    =IF(INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*27)="","",INDIRECT("'Full Survey'!B"&ROWS(B$3:B3)*27))

    so for it to work across all 80 rows it would need to change the *31 or *27 figure each time it is copied down, but it doesnt, its just the range that changes the B$3:B3 changes to B$3:B4 etc which appears to relate to the Summary Page and not the Full Survey page...

  20. #20
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Help Please For Formula Copy Skipping Cells?

    the row interval is 27, but the data to be returned starts on row 4, so it should look at rows 4 then + 27 to row 31
    No, that IS how it needs to be, it just needs to start in row 4...
    =IF(INDIRECT("'Full Survey'!B"&ROWS(B$4:B4)*27)="","",INDIRECT("'Full Survey'!B"&ROWS(B$4:B4)*27))

  21. #21
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    Ignore this entry
    Last edited by PJC2013; 07-13-2015 at 02:53 PM.

  22. #22
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    Quote Originally Posted by pjc2013 View Post
    ignore this
    Ok! ______

  23. #23
    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,781

    Re: Help Please For Formula Copy Skipping Cells?

    this it .....???

    =IF(INDIRECT("'Full Survey'!B"&ROWS($B$3:B6)*27+4)="","",INDIRECT("'Full Survey'!B"&ROWS($B$3:B6)*27+4))

  24. #24
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    Something like this?

    =IF(AND((OFFSET('Full Survey'!D$1,(ROWS(H$3:H3)-1)*27,0)="SINGLE")),(OFFSET('Full Survey'!H$14,(ROWS(H$3:H3)-1)*27,0)="IMPROVE")),1,"")

  25. #25
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Help Please For Formula Copy Skipping Cells?

    Sorted I think?

    =IF(AND((OFFSET('Full Survey'!D$1,(ROWS(H$3:H3)-1)*27,0)="SINGLE"),(OFFSET('Full Survey'!H$14,(ROWS(H$3:H3)-1)*27,0)="IMPROVE")),1,"")

  26. #26
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    Yeah, that'll work but you can use less sets of ( )...

    =IF(AND(OFFSET('Full Survey'!D$1,(ROWS(H$3:H3)-1)*27,0)="SINGLE",OFFSET('Full Survey'!H$14,(ROWS(H$3:H3)-1)*27,0)="IMPROVE"),1,"")

  27. #27
    Registered User
    Join Date
    09-21-2013
    Location
    Reading, UK
    MS-Off Ver
    Excel 2010
    Posts
    41
    Quote Originally Posted by Tony Valko View Post
    Yeah, that'll work but you can use less sets of ( )...

    =IF(AND(OFFSET('Full Survey'!D$1,(ROWS(H$3:H3)-1)*27,0)="SINGLE",OFFSET('Full Survey'!H$14,(ROWS(H$3:H3)-1)*27,0)="IMPROVE"),1,"")
    Thank you!

    Thanks for your help.

  28. #28
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Help Please For Formula Copy Skipping Cells?

    You're welcome!

+ 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. Replies: 1
    Last Post: 05-21-2014, 04:30 PM
  2. [SOLVED] Copy cells from one worksheet to another while skipping blanks
    By gawk1980 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-23-2013, 05:02 PM
  3. Copy and Paste while skipping cells
    By Mbutler132000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2010, 12:24 PM
  4. how to copy function in a column skipping cells
    By sekernicek in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2009, 09:26 AM
  5. Skipping cells with formula copy?
    By Delekii in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-31-2008, 08:32 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