+ Reply to Thread
Results 1 to 11 of 11

Formula to alamgamate and edit?

  1. #1
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Formula to alamgamate and edit?

    Hi all,

    I’ve been given a project at work to try and tidy up a spreadsheet. I have several questions but for the time being, I’m dealing with the first problem I’m come across.

    When a payment arrives, the system notes it correctly but does not add the comment into one line; it breaks it up into 3 lines and when an Excel report is generated, it shows on 3 lines. Attached is how they come out and how I want them to come out. Can they be cut and pasted and amalgamated into the first row?

    If this is possible, I have the issue of deleting those blank rows once the data is removed from them; is this possible? Maybe a keyboard shortcut or Macros?

    I may keep adding questions to this thread as I move along.

    Thanks for your help,

    Lee.
    Attached Files Attached Files

  2. #2
    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,309

    Re: Formula to alamgamate and edit?

    Do the 3 lines have a consistent format, in particular line 2 with the numeric data?

    And what volumes (number of invoices) need converting ?

  3. #3
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Formula to alamgamate and edit?

    Hi
    if you just want a formula this should do it:
    =TRIM(E5)&" "&TRIM(SUBSTITUTE(E6,",",", "))&" " &E7

    The macro get a bit complicated because, as John indicates, it will depend on how the data are laid out. Assuming there are always three rows of text to combine in column E and the date value in column A is always followed by 2 blank rows then this might work:

    Please Login or Register  to view this content.


    assuming there are always three rows of text in column E to combine, this will

  4. #4
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to alamgamate and edit?

    Hi Nicky,

    That formula is great - thanks.

    However, may I throw another issue in? Regarding the 6642, 86643, 86644, - on some lines, there are only 3 sets of numbers and in others there could be 8 sets of numbers. It varies on different lines. Can the formula be amended to reflect this change?

    Also, I'm looking for a second formula to search for an invoice number in the 'Allocated to...' column. In the spreadsheet, I've added a second tab called '2nd Formula.' Is there a way to highlight / show the invoices being paid?

    Thanks for your help,

    Lee.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to alamgamate and edit?

    Hello John,

    Yes, the 3 lines have consistent formatting.

    Regarding the number of invoices, this varies with each entry. Some can have 2 invoice numbers, while others can have 10 or more. The reason I asked if they could be spaced was if a search formula was used in this column, would it pick up the invoice number without spaces?

    Thanks for your help,

    Lee.

  6. #6
    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,309

    Re: Formula to alamgamate and edit?

    The code supplied handles multiple invoices
    Last edited by JohnTopley; 05-01-2021 at 03:55 PM.

  7. #7
    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,309

    Re: Formula to alamgamate and edit?

    How are you going to select the "Invoice" line and hence invoices you want highlighted?

  8. #8
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to alamgamate and edit?

    Quote Originally Posted by JohnTopley View Post
    How are you going to select the "Invoice" line and hence invoices you want highlighted?
    Hello John,

    I was thinking something like a cell being filled with 'Paid' or something similar? Would that work?

    Lee.

  9. #9
    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,309

    Re: Formula to alamgamate and edit?

    If it is selected from the sheet where the data is combined, then there is a possibility to use VBA to highlight the invoices.

    At some point you will want to remove the highlighting ??? otherwise you could end up with all invoices highlighted.

    Or have I misunderstood your requirement?

  10. #10
    Registered User
    Join Date
    02-03-2018
    Location
    Manchester, UK
    MS-Off Ver
    2013
    Posts
    76

    Re: Formula to alamgamate and edit?

    No, I think that is correct.

    To add some context - the workbook might list 1,000 invoices, of which we have payments on the account for 500 of those invoices. Instead of manually locating and highlighting them, I thought there could be a way of highlighting those listed in payments postings. There will come a time when the highlighting will be removed but I haven't thought that far ahead yet.

    Thanks again,

    Lee.

  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,309

    Re: Formula to alamgamate and edit?

    Thinking aloud: if there are number of "invoice" sets, I suggest it each set is coloured differently.

    Can you add some more sample data to the file in post #4, including the "trigger" (paid ?).

    I'll try and look at it over the weekend.

+ 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. Edit formula to remove #VALUE from INDEX SUMPRODUCT ROW formula result
    By JohnElliott in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-21-2019, 03:05 PM
  2. Edit edit links macro to automate sheet selection
    By sds1126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2015, 12:27 PM
  3. Replies: 2
    Last Post: 03-21-2014, 11:43 AM
  4. Replies: 0
    Last Post: 09-06-2008, 01:50 PM
  5. IF formula question:edit the fist half of the original formula
    By impress in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 08:35 PM
  6. [SOLVED] i edit a formula (excel) then it displays formula not answer
    By caiman in forum Excel General
    Replies: 2
    Last Post: 09-08-2005, 10:05 PM
  7. Why can't I edit my excel document? Edit buttons shaded.
    By Arl @ CBC in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 09-06-2005, 02:05 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