+ Reply to Thread
Results 1 to 7 of 7

Wrong data type?

  1. #1
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Wrong data type?

    I want the product of a cell plus a number to show up in a 3rd cell, so I used the formula =G47*0.07, but the 3rd cell shows the unwanted word "value" and there's an ! that states "A value used in the formula is of the wrong data type." Is there a different formula I should use?
    Last edited by oceanside; 02-03-2013 at 05:31 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Wrong data type?

    Hi Oceanside,

    I'd expect the thing in G47 is NOT a number. You are trying to multiply text times a number. Check for the letter "Oh" in your numbers???
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Wrong data type?

    Marvin,
    G47 formula is =IF(SUM(G21:G46)=0,"",SUM(G21:G46)). So until G21-G46 have values, G47 should be blank. G48 adds sales tax to product amount entered into G21 thru G46 and totaled in G47. G47 is a subtotal of G21 thru G46. G48 should add sales tax based on amount in G47. If I put =G47*0.07 in G48 I get the word value in the cell until a value is calculated. I don't want "value" on the sheet.
    Last edited by oceanside; 02-03-2013 at 05:25 PM.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Wrong data type?

    Purged my post after getting better information.

    Try this:
    =N(G47)*0.07

    the N() function will convert the "text blank" to a zero.

    Does that help?
    Last edited by Ron Coderre; 02-03-2013 at 05:25 PM.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Wrong data type?

    Hi,

    The "" is text. Change your formula to :
    =IF(SUM(G21:G46)=0,0 ,SUM(G21:G46))

    and see what happens.

    Then look at the IfError function.

  6. #6
    Registered User
    Join Date
    10-22-2018
    Location
    God's land
    MS-Off Ver
    2016
    Posts
    1

    Re: Wrong data type?

    Quote Originally Posted by Ron Coderre View Post
    Purged my post after getting better information.

    Try this:
    =N(G47)*0.07

    the N() function will convert the "text blank" to a zero.

    Does that help?
    I know this is a dead thread, but thank you this solved it for me.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Wrong data type?

    Hala123, thanks for the feedback
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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