+ Reply to Thread
Results 1 to 13 of 13

Formula Needed to Link Two Partial Values into Third Cell

  1. #1
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Question Formula Needed to Link Two Partial Values into Third Cell

    Hello all,

    I have two sheets I'm working with in my workbook. The first sheet is called 'Data Entry', and the second is called 'Inspection Report'.

    On the Data Entry sheet, there are two cells that receive data.
    The first is the A Cell where data is entered in Cell B3:H3 in the format of the following example:
    1234567890

    The second is the B Cell where data is entered in Cell B4:F4 in the format of the following examples:
    0010
    0020
    0030
    0040
    0050
    0060
    0070
    0080
    0090
    0100
    0110
    0120
    etc. (will never exceed 0990)

    On the Inspection Report sheet, there's a C Cell which contains Cell C3:I3. I would need a formula in this cell which would be linked to the values of the A Cell as well as part the number from the B Cell, displaying the two data entries as one, separated by a '-'.

    To clarify:

    Example 1:
    On the Data Entry Sheet:
    A Cell= 1234567890
    B Cell= 0030

    On the Inspection Report Sheet:
    C Cell now reads 1234567890-3

    Example 2:
    On the Data Entry Sheet:
    A Cell= 5555566666
    B Cell= 0110

    On the Inspection Report Sheet:
    C Cell now reads 5555566666-11

    Can this be done through a formula in the C Cell? Any and all help is greatly appreciated, thank you! And have an awesome day!
    Last edited by swordswinger710; 12-08-2010 at 12:45 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Formula Needed to Link Two Partial Values into Third Cell

    I suggest you attach a small sample workbook.

  3. #3
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    And here is a sample for you.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Formula Needed to Link Two Partial Values into Third Cell

    OK, this perhaps.

    ='Data Entry'!B3&"-"&SUBSTITUTE('Data Entry'!B4,"0","")

    But everyone here will tell you not to use merged cells, and I can't see a good reason for you doing so.

  5. #5
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    Hey thanks! A problem arises, however, for values over 0090 that actually require a 0, such as 0100, which currently becomes a -1 instead of a -10. Is there a way around this?

    And yes, I'm quite aware of the 'thing' with the merged cells, however, if you saw the full worksheet you'd see the need for them as I do.
    Last edited by swordswinger710; 12-07-2010 at 04:35 PM.

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Formula Needed to Link Two Partial Values into Third Cell

    This will divide by 10 so equivalent to knocking off a zero at the end:

    ='Data Entry'!B3&"-"& 'Data Entry'!B4/10

  7. #7
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    WOW! I am impressed. That was amazing. Thank you!

  8. #8
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    Ooh, another thing just came up - when the B Cell is empty, can the C Cell not display anything? Right now it shows a lovely -0. If there's any way to add that function to your formula, that would be sweet. Thanks again!

  9. #9
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Formula Needed to Link Two Partial Values into Third Cell

    How about this?

    =IF('Data Entry'!B3="","",'Data Entry'!B3&"-"& 'Data Entry'!B4/10)

  10. #10
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    Once I changed it to:

    =IF('Data Entry'!B4="","",'Data Entry'!B3&"-"& 'Data Entry'!B4/10)

    it worked awesome! Thanks so much again!

  11. #11
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    And now it doesn't work any more due to the format of the B Cell being changed here..
    Attached Files Attached Files

  12. #12
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Formula Needed to Link Two Partial Values into Third Cell

    Presumably you don't need the division by 10 bit any more?

  13. #13
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Formula Needed to Link Two Partial Values into Third Cell

    I removed the /10 at the end, and wow, I was like, that was easy. Thank you so much again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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