+ Reply to Thread
Results 1 to 5 of 5

variable answer if formula?

  1. #1
    Registered User
    Join Date
    02-02-2017
    Location
    Missouri
    MS-Off Ver
    2010
    Posts
    5

    variable answer if formula?

    Not sure what the best route is here. I'm trying to draft info from a 10 row range to another sheet in the same workbook based on a variable answer.

    The source worksheet has 10 rows with the needed data in Z10-Z19.
    Each row has data representing time spent at one of 6 locations, so I've used column S (S10-S19) to hold an identifier for the appropriate location that time was spent at, "A", "G", "MG", "T", "W", or "WP".

    Each location has a column in the destination worksheet. I need to figure out how to send the data from Z10-Z19 to the appropriate column based on the location identifier from S10-S19.

    To complicate slightly more, there are 14 worksheets I'd be doing this for, sending them all to 1 destination sheet, with each of the 14 having a row. All this would be done for 2, 15 day ranges. So it's data from a 2 week period going into a bi-weekly timesheet.

    Any ideas?

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

    Re: variable answer if formula?

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: variable answer if formula?

    Hi all- Something like this? In B3, copied across and down:
    Please Login or Register  to view this content.
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    2
    Sheet Name A G MG T W WP
    3
    Sheet1 D1r8 D1r2 D1r3 D1r7 D1r1 D1r4
    4
    Sheet2 D2r10 D2r4 D2r2
    #N/A
    D2r1 D2r3
    5
    Sheet3
    #N/A
    D3r3 D3r2 D3r1
    #N/A
    #N/A
    6
    Sheet4
    #N/A
    #N/A
    D4r4 D4r3 D4r7 D4r1


    As AliGW pointed out, an uploaded workbook would help us answer your needs directly. It should be the first thing you include in a new thread.
    Attached Files Attached Files
    Last edited by leelnich; 03-01-2018 at 04:35 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Registered User
    Join Date
    02-02-2017
    Location
    Missouri
    MS-Off Ver
    2010
    Posts
    5

    Re: variable answer if formula?

    Thanks very much.
    Capture daily sheet.PNG
    This is a sample of the daily work sheet, there are 28 total in the workbook, 14 then a mileage and timesheet, then 14 more and another mileage and timesheet.

    Capture destination sheet.PNG
    This is the destination. The data from column Z, rows 10-19 in the daily worksheet need to end up in the correct column in the destination, so my thought was to use an identifier, column S, to tag the column Z data, then have it draft to the correct column in the destination based on an IF formula. Then I got to thinking it would take a sub chart in each day that would boil it down, then make that draft to the destination, but I'm struggling a bit.

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

    Re: variable answer if formula?

    There are instructions in post #2 about how to attach your workbook.

+ 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] On formula answer if a 0 (zero) answer, must be blank
    By Colin Smitie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-17-2017, 06:43 AM
  2. Variable Answer result
    By GordonP in forum Excel General
    Replies: 2
    Last Post: 03-25-2016, 02:37 PM
  3. [SOLVED] Automatically answer Named Conflict Dialog with No and set Named range to variable
    By mlj61289 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2013, 08:32 PM
  4. VBA Vlookup Formula not populating variable with answer
    By orozvik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-15-2013, 01:01 PM
  5. Replies: 0
    Last Post: 02-01-2013, 09:26 PM
  6. Replies: 1
    Last Post: 11-21-2012, 02:03 AM
  7. Replies: 2
    Last Post: 09-08-2005, 10:05 PM

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