+ Reply to Thread
Results 1 to 4 of 4

Help with IF function range across worksheets

Hybrid View

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help with IF function range across worksheets

    My excel file has one main sheet, with extra sheets for each day of the month. The file is meant to be shared and then sent back to me. On the main sheet individuals will input their information requests and it will automatically reproduce that information into the corresponding worksheet for the date.
    Currently I have an extremely long (too long, too large of a file) IF function because of what I am looking for it to do. Here is a sample of my current IF formula.

    =IF('Main Sheet'!$D4=DATE($K$2,$L$2,$M$2),'Main Sheet'!C4,IF('Main Sheet'!$D5=DATE($K$2,$L$2,$M$2),'Main Sheet'!C5,IF('Main Sheet'!$D6=DATE($K$2,$L$2,$M$2),'Main Sheet'!C6,"")))

    I have this which goes on for 64 iterations.
    If the date in D4 on the Main Sheet matches the Date calculated on a the current worksheet then it reproduces the information from the Main Sheet cell C4, but if not then it goes to the next cell (D5) on the Main Sheet and does the same thing for C5.

    Any help will be extremely helpful, thank you.

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Help with IF function range across worksheets

    Don't forget to use code tags.

    I would use a vlookup for something like that, although you may need to switch columns C and D around since the vlookup uses the left most column for search then offsets to a value on the right. Assume you switch the two columns,

    =vlookup(DATE($K$2,$L$2,$M$2),'Main Sheet'!$C$4:$C$68,2,false)

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help with IF function range across worksheets

    I have tried to mess around with Vlookup, I can try some more but there are 6 columns of information that I need inputted, so the same code is reproduced then for column E,F,G,H,I,J (which is looking for a Date match still but different info)

  4. #4
    Registered User
    Join Date
    02-27-2013
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help with IF function range across worksheets

    I figured out a solution but not what I initially looked for. I couldn't get Vlookup to work because of the amount of columns of info I needed. I used my initial IF function but only one function for each correlating cell.

    IF('Main Sheet'!$D4=DATE($K$2,$L$2,$M$2),'Main Sheet'!C4,"")

    Then I simply added Filtering options to every worksheet in my file to filter out any Blanks so only cells with info are shown for that specific sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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