+ Reply to Thread
Results 1 to 22 of 22

need copy data according to other value in other cell

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    need copy data according to other value in other cell

    Dear All
    i would like to copy data for only name present in column J that represent for column I
    the data
    A23:g35 copy from A7:A20 but remove the absent from this in represented date
    Attached Files Attached Files
    Last edited by mazan2010; 07-04-2017 at 11:35 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: need copy data according to other value in other cell

    in A24
    =IFERROR(INDEX($A$8:$G$20,SMALL(IF(($J$8:$J$20="Present"),ROW($A$1:$A$13)),ROW(A1)),COLUMN()),"")
    Array formula, use Ctrl-Shift-Enter
    copy down and across to G35
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    Dear Special-K
    its working good if look only one date but if the date change for example in my new file it's not working
    i need look to absent and present in the represent date
    Attached Files Attached Files

  4. #4
    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
    28,207

    Re: need copy data according to other value in other cell

    in A24

    =IFERROR(INDEX(A$8:A$20,SMALL(IF(($J$8:$J$20="Present")*($D$8:$D$20=$J$7),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    copy across and down

    Date check added
    Last edited by JohnTopley; 07-04-2017 at 12:36 PM.

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    its not working please my attached file
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: need copy data according to other value in other cell

    Quote Originally Posted by mazan2010 View Post
    Dear Special-K
    its working good if look only one date but if the date change for example in my new file it's not working
    i need look to absent and present in the represent date
    You've added a date column that wasnt there in the original
    I dont have time to come up with a solution for each little amendment you decide to make.
    Perhaps someone else can solve this.

  7. #7
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    thanks for your attention and reply

  8. #8
    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
    28,207

    Re: need copy data according to other value in other cell

    See post #4

  9. #9
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    Dear JohnTopley
    its not working if i change the date
    can see my attached file
    i found this post in other site but can't modify it to fit my needs

    https://stackoverflow.com/questions/...-results-sheet
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    did you see if this formula can be work or not please
    Quote Originally Posted by JohnTopley View Post
    See post #4

  11. #11
    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
    28,207

    Re: need copy data according to other value in other cell

    If you use the right date reference .....

    =IFERROR(INDEX(A$8:A$20,SMALL(IF(($J$8:$J$20="Present")*($D$8:$D$20=$B$2),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

    OR

    =IFERROR(INDEX(A$8:A$20,SMALL(IF(($J$8:$J$20="Present")*($D$8:$D$20=$K$7),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

  12. #12
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    dear JohnToply
    i put last your formula but still not working
    i think you didn't understand me exactly
    i have employ at work , using attending (absent or present ) that generate data for employ in case present only
    this attending data in column I:M column
    hope now you what i need is clear for you
    Quote Originally Posted by JohnTopley View Post
    If you use the right date reference .....

    =IFERROR(INDEX(A$8:A$20,SMALL(IF(($J$8:$J$20="Present")*($D$8:$D$20=$B$2),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

    OR

    =IFERROR(INDEX(A$8:A$20,SMALL(IF(($J$8:$J$20="Present")*($D$8:$D$20=$K$7),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

  13. #13
    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
    28,207

    Re: need copy data according to other value in other cell

    Did you enter it as an array formula ??????

    And you need to change the reference form J to K.

    I'll look at INDEX replacement for this.
    Last edited by JohnTopley; 07-04-2017 at 02:28 PM.

  14. #14
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    Quote Originally Posted by JohnTopley View Post
    Did you enter it as an array formula ??????
    please see my attached file
    you will find in row 29 and 31 AAA7 and AAA9 is have data although they are not present from represent Date in column K
    Attached Files Attached Files

  15. #15
    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
    28,207

    Re: need copy data according to other value in other cell

    Try

    =IFERROR(INDEX(A$8:A$20,SMALL(IF((INDEX($J$8:$Z$20,,MATCH($B$2,$J$7:$Z$7,0))="Present")*($D$8:$D$20=$B$2),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    Formula corrected ....
    Last edited by JohnTopley; 07-04-2017 at 02:35 PM.

  16. #16
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    thanks it working very well now
    many thanks Dear JohnTolpey
    really you all the time help me in my post

  17. #17
    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
    28,207

    Re: need copy data according to other value in other cell

    Corrected formula in #15

  18. #18
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    yes its work good

  19. #19
    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
    28,207

    Re: need copy data according to other value in other cell

    I changed K7 to B2 reference in last formula: make sure your formula has this change.

  20. #20
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    not understand exactly what you mean
    Quote Originally Posted by JohnTopley View Post
    I changed K7 to B2 reference in last formula: make sure your formula has this change.

  21. #21
    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
    28,207

    Re: need copy data according to other value in other cell

    =IFERROR(INDEX(A$8:A$20,SMALL(IF((INDEX($J$8:$Z$20,,MATCH($B$2,$J$7:$Z$7,0))="Present")*($D$8:$D$20=$B$2),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

  22. #22
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: need copy data according to other value in other cell

    two is the same and its work good many thanks
    Quote Originally Posted by JohnTopley View Post
    =IFERROR(INDEX(A$8:A$20,SMALL(IF((INDEX($J$8:$Z$20,,MATCH($B$2,$J$7:$Z$7,0))="Present")*($D$8:$D$20=$B$2),ROW($A$8:$A$20)-ROW($A$8)+1,""),ROWS($A$8:A8))),"")

+ 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] Macro - If adjacent cell contains any data, then copy data from another cell. Possible?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-15-2014, 06:07 AM
  2. [SOLVED] Formula Needed to copy data from a cell based on data entered into another cell
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-10-2013, 03:16 AM
  3. [SOLVED] Copy data with 4 cell interval and copy range of data like vlookup with structured output
    By Daydreams in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-23-2013, 04:08 AM
  4. [SOLVED] How to copy data in a cell in Sheet1 to a cell in Sheet2 using =COPY( )?
    By Mr D Relf in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-17-2013, 10:39 AM
  5. Use VBA to copy Data Validation reference cell font color to destination cell?
    By proav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2012, 08:09 PM
  6. Replies: 0
    Last Post: 11-06-2012, 06:44 PM
  7. Replies: 3
    Last Post: 07-15-2010, 08:49 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