+ Reply to Thread
Results 1 to 5 of 5

Constructing sentences using fields (database-like)

  1. #1
    Registered User
    Join Date
    05-19-2016
    Location
    Brisbane
    MS-Off Ver
    Office 2011
    Posts
    9

    Constructing sentences using fields (database-like)

    Hi.

    Normally, I have a rough idea where to start with these sorts of things but this one has me beat.

    For a real estate office, I have to come up with a way of constructing multiple variations of a sentence from pre-defined fields.

    Example:
    Screen Shot 2016-11-02 at 4.15.11 PM.png

    The exact fields will be given to me later and I have the property addresses broken up by street number/name and suburb.

    So I need excel to extract every conceivable sentence using those fields (the results can be spat out into another cell or multiple cells on another sheet)

    Examples:
    1. Your house at address 1 is ready for inspection
    2. Your house at address 1 is awaiting pest control
    3. Your apartment at address 5 is ready for inspection
    4. Your land at address 3 has been approved for development

    Etc and so on.

    I realise the total number of permutations in that little lot equals 4^3 (64) and there are hundreds of properties to add in. It has been explained WHY they need this but I still don't get it. I'm just the monkey, not the organ-grinder.

    I've been struggling with this for a week and I still cannot think of a logical formula.

    Any help is MASSIVELY appreciated.
    Last edited by Trotters; 11-02-2016 at 02:24 AM.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,371

    Re: Constructing sentences using fields (database-like)

    As it shown your table in on ranges A1 to C4

    1. put this on A6 and copied down and cross to Column B
    =INDEX(A$1:A$4,INT((ROW(A1)-1)/4)+1)

    2. Put this on C6 and copied down as necessary
    =INDEX($C$1:$C$4,MOD(ROWS(A1:$A$1)-1,ROWS($C$1:$C$4))+1)

    and try look on my file
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-19-2016
    Location
    Brisbane
    MS-Off Ver
    Office 2011
    Posts
    9

    Re: Constructing sentences using fields (database-like)

    Hi Azumi,

    Many thanks! That works in a limited way.

    It's working out every permutation from column C but is fixing A and B
    So it's always A1 and B1, A2 and B2, A3 and B3.

    I need to be able to work out EVERY conceivable combination.

    Example:
    A1 B1 C1
    A4 B2 C3
    A2 B3 C2

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Constructing sentences using fields (database-like)

    Please attach a sample excel file with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    05-19-2016
    Location
    Brisbane
    MS-Off Ver
    Office 2011
    Posts
    9

    Re: Constructing sentences using fields (database-like)

    No need. I found a solution (link below). Works perfectly.

    Thank you for your help anyway.

    http://www.ashishmathur.com/create-a...out-using-vba/

+ 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. Find a requested word within sentences and output those sentences elsewhere
    By swfred2000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-19-2014, 02:24 PM
  2. Help matching fields in a database
    By simjambra in forum Excel General
    Replies: 2
    Last Post: 03-13-2009, 12:28 PM
  3. Data List in Database Form Fields
    By wz4np1 in forum Excel General
    Replies: 4
    Last Post: 03-02-2008, 12:22 PM
  4. Replies: 1
    Last Post: 09-28-2006, 03:30 AM
  5. Fields in access database
    By Justin Philips in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2006, 10:40 PM
  6. [SOLVED] Fields in access database
    By Justin Philips in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2006, 07:10 PM
  7. Replies: 1
    Last Post: 01-25-2006, 04:30 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