+ Reply to Thread
Results 1 to 22 of 22

IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Question IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Hello,
    I need Formula
    For example if I choose salary/dividend/service in B4 cell in any month sheet, the formula should move the income tax value to sufficient cell in Mainform.
    I will attach the file to make it clear.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    "if I choose salary/dividend/service in B4"
    How are you going to do that?

    Or do you want ALL values to appear in the table which is not actually choosing anything.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    "if I choose salary/dividend/service in B4"
    How are you going to do that?

    It has drop-down menu attached.

  4. #4
    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
    30,679

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    You will need VBA to do this.

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Quote Originally Posted by JohnTopley View Post
    You will need VBA to do this.
    No you won't.

    Sheet1!E9 has two spaces between "1.2.2:" and service. Change this to one space as per the other descriptions.

    Then

    in mainform!C3
    =IFERROR(VLOOKUP("1.1: "&C$2,INDIRECT($B3&"!B$4:E$1000"),4,0),"")

    in mainform!D3
    =IFERROR(VLOOKUP("1.2.1: "&C$2,INDIRECT($B3&"!B$4:E$1000"),4,0),"")

    in mainform!E3
    =IFERROR(VLOOKUP("1.2.2: "&C$2,INDIRECT($B3&"!B$4:E$1000"),4,0),"")

    and copy down the columns.

    The Income tax values will apear if appropriate.
    If you change the selection by drop down menu the mainform sheet will reflect the change.

  6. #6
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    desktop.jpg
    I have this problem when typing that formula.

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    You've copied it incorrectly.
    If you copy the three formulas into a blank spreadsheet that error doesn't occur so you must have changed something.

  8. #8
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Did you do this as suggested above?
    "Sheet1!E9 has two spaces between "1.2.2:" and service. Change this to one space as per the other descriptions."

  9. #9
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Apologies, the formulas on the forum are different to what I entered on the spreadsheet.
    They should be

    in mainform!C3
    =IFERROR(VLOOKUP("1.1: "&C$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    in mainform!D3
    =IFERROR(VLOOKUP("1.2.1: "&D$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    in mainform!E3
    =IFERROR(VLOOKUP("1.2.2: "&E$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    and copy down the columns
    Last edited by Special-K; 05-11-2017 at 06:37 AM.

  10. #10
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    That's strange, I had this working yesterday with several figures appearing.
    Now I'm only getting a figure for jan/Salary 20%.

    I'll take another look at this...

  11. #11
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Thank you for your help
    The formula is working but another problem is that, for example when i choose salary it appears in all three cells.
    I need it to take for example only salary value when i choose it in month sheets.

  12. #12
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Quote Originally Posted by tsikara View Post
    Thank you for your help
    The formula is working but another problem is that, for example when i choose salary it appears in all three cells.
    I need it to take for example only salary value when i choose it in month sheets.
    Can you post the file?

  13. #13
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    I'm attaching the file
    Attached Files Attached Files

  14. #14
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    You've changed the descriptions.
    Sheet1 was

    1.1 Salary
    1.2.1 Dividend
    1.2.2 Service

    It's now

    1.2.1 Salary
    1.2.2 Dividend
    1.2.3 Service

    You've reflected this change correctly in the formulas. But...
    Your jan feb mar sheets have different descriptions, e.g. feb has 1.2.1 Dividend, 1.2.1 Dividend doesnt exist on Sheet1.
    Same for Mar 1.2.1 Dividend
    Apr has 1.2.2 Service, 1.2.2 Service doesnt exist on Sheet1

    Also your formulas are incorrect.
    They should be

    n mainform!C3
    =IFERROR(VLOOKUP("1.2.1: "&C$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    in mainform!D3
    =IFERROR(VLOOKUP("1.2.2: "&D$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    in mainform!E3
    =IFERROR(VLOOKUP("1.2.3: "&E$2,INDIRECT($B3&"!$B$4:E$1000"),4,0),"")

    and copy down the columns

    as per post #10

  15. #15
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Our format can't recognize ( , )-this symbol
    we use ( ; ) instead.

    Main problem is that when i choose salary, it takes all three category value in mainforms then when i choose dividend it take rest two, and only third works as it should, because there is no category left.
    So when i choose salary it should take only "salary" value and so on.
    Last edited by tsikara; 05-11-2017 at 07:40 AM.

  16. #16
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    The , ; is irrelevant, just change the commas for semi colons as per your regional setting.

    Here is a copy of the file with correct figures.
    See if you can amend the commas to semicolons
    Attached Files Attached Files

  17. #17
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    If you have problems with that file then use this file.
    I have made each formula a piece of text (inserted ' at the beginning)

    Do a Find/Replace , with ;
    Manually remove the the apostrophe at the beginning of C3 D3 E3 and the text will change to formulas suited to your region.
    Copy them down the columns.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    I tried that file but now when i choose salary for exaple in Jan.sheet,in mainform the value appears in salary and in dividend too. the rest two works.

    is it possible: when i need to write down more than one salary and i want formula to sum the similar categories and paste it's value to apropriate cell in mainforms

  19. #19
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    To make it clear
    I'm attaching the file
    Attached Files Attached Files

  20. #20
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,076

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Your sum is wrong in Jan
    You're summing E3:E7, surely this should be E4:E7 ?

    I cant help you with this, the example data you originally provided was ONE entry for each month tab.
    I assumed it was going to be a maximum of 4 different type, but now you have multiple entries per month tab with the same "1.2.1" description so a VLOOKUP won't work.

    I don't have any more itme to spend on this as this is getting far more complicated than I envisged.
    Hope you find someone to sort this out.

  21. #21
    Registered User
    Join Date
    05-10-2017
    Location
    Tbilisi
    MS-Off Ver
    Office 2016
    Posts
    11

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    Thank you for your help and spending time

  22. #22
    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
    30,679

    Re: IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET

    See attached:

    in C3 of "Mainform"

    =SUMPRODUCT((INDIRECT("'" &B3&"'!$E3:$E100"))*(INDIRECT("'" &B3&"'!$B3:$B100")=C$2))

    copy across and down

    I changed your drop down to remove the 1.2.1 etc so as to match headings in row 2 of "Mainform"
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Two validations: first choose the sheet (1-5), then choose the option
    By bee88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-17-2014, 08:12 AM
  2. Replies: 3
    Last Post: 11-29-2013, 10:27 AM
  3. [SOLVED] Formula help to choose lowest cost from multiple vendors and then choose vendor
    By roland_arv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-27-2013, 07:48 PM
  4. Macro to move rows of text to another sheet
    By ianpwilliams in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2013, 12:57 PM
  5. [SOLVED] Convert text to numbers and move appropriate rows to another sheet.
    By markDuffy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2013, 07:55 AM
  6. How to identify text (compare) in one sheet, then move it another
    By mag7417 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2005, 10:54 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