+ Reply to Thread
Results 1 to 7 of 7

VBA: Moving contents of cell from one cell to another based on dropdown criteria.

  1. #1
    Registered User
    Join Date
    08-05-2019
    Location
    Jersey
    MS-Off Ver
    Mac 2016
    Posts
    4

    VBA: Moving contents of cell from one cell to another based on dropdown criteria.

    Hi All

    I'm not really sure how to sum up this query in the title so I will try to explain what I am trying to do here.

    Every month I receive a list and/or receipts of expenses - these are numerous. Each individual expense needs to be recorded into a spreadsheet. Row A has the category headings, ie, Food (Column B), Entertainment (Column C), Travel, Management Costs etc in individual columns. The rows underneath list the details of the expenses. For example a receipt for a supermarket would be listed on Row 2, Column A (A2) as 'Waitrose" and then in the food category (B2) the amount on the receipt would be entered. A receipt for the cinema - 3A, amount listed in the column 3C for Entertainment.

    As I there are so many to enter I find it simplier to enter all the expenses and the expense value and then drag this value to the correct column, however, it is a very time consuming task to make sure when you are dragging the values they remain in the right row and then column, particularly as the spreadsheet gets larger. What I would like to do is enter all the descriptions and amounts and then using a drop down select the correct catogory and this would tell excel which column the value needs to go into. For example if I had Cinema in A2 and the amount in Column B I could use a dropdown the catgorise the spend and it would automatically move the value from Column B to Column C.

    I have attached a workbook which I hope explains what I am trying to do.

    I would be so grateful if someone could help me with this as I cannot find anything on Google.
    Attached Files Attached Files
    Last edited by Emmaizzy; 08-05-2019 at 10:43 AM. Reason: Adding Worksheet

  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. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,862

    Re: Moving contents of cell from one cell to another based on dropdown criteria.

    Welcome to the forum.

    You can't do this without VBA. Shall I move the thread for you?

    You CAN post your workbook.

    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
    Registered User
    Join Date
    08-05-2019
    Location
    Jersey
    MS-Off Ver
    Mac 2016
    Posts
    4

    Re: Moving contents of cell from one cell to another based on dropdown criteria.

    Hi Ali

    Thanks for the reply - please move my post to the right place.

    I think that until I have created more posts I'm not allowed to do attachments, images, links etc.

  4. #4
    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. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,862

    Re: Moving contents of cell from one cell to another based on dropdown criteria.

    Yes, you CAN attach a workbook, even as a new member, and I have just explained how! I think I should know, don't you?

  5. #5
    Registered User
    Join Date
    08-05-2019
    Location
    Jersey
    MS-Off Ver
    Mac 2016
    Posts
    4

    Re: VBA: Moving contents of cell from one cell to another based on dropdown criteria.

    Sorry Ali - I didn't mean any offence - I misunderstood what this message meant when it appeared "You are not allowed to post any kinds of links, images or videos until you post a few times."

  6. #6
    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. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,862

    Re: VBA: Moving contents of cell from one cell to another based on dropdown criteria.

    No worries. Please do upload a workbook - it will help. I have moved the thread.

  7. #7
    Registered User
    Join Date
    08-05-2019
    Location
    Jersey
    MS-Off Ver
    Mac 2016
    Posts
    4

    Re: VBA: Moving contents of cell from one cell to another based on dropdown criteria.

    Done - thanks.

+ 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. Moving contents of a cell to another row based on certain criteria?
    By bilge12 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-19-2017, 01:36 PM
  2. Moving data to different sheets based on cell contents
    By asml8d in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-25-2017, 04:11 PM
  3. [SOLVED] Moving Cell Contents in a Certain Direction Based on Another Cell's Contents
    By Cloud909 in forum Excel Charting & Pivots
    Replies: 10
    Last Post: 07-22-2016, 09:44 PM
  4. Clear cell contents based on offset of dropdown selection on another tab.
    By Drivium in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 10:58 PM
  5. Moving Cell contents with a formula, based on the column value?
    By bvandervyver44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2013, 02:51 AM
  6. Replies: 0
    Last Post: 05-21-2012, 06:59 AM
  7. Moving rows based on cell contents
    By WasWodge in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2010, 11:27 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