+ Reply to Thread
Results 1 to 17 of 17

Help Userforms / Excel SUMIF

  1. #1
    Registered User
    Join Date
    05-26-2005
    Posts
    8

    Help Userforms / Excel SUMIF

    Hi,

    I have a spreadsheet that has a userform which allows a user to input numbers that then get copied back to cells back on the spreadsheet.

    This works fine, it sends the data from the userform to the spreadsheet.

    But I have a hidden data part at bottom of spreadsheet with Column1 May and Column2 June and on the userform you send the data for may or june and it gets put in the column. At the top of the spreadsheet I have a table and I only want one month displaying at a time so Cell A1 is the month name and if the user types May the table shows the May data hidden at the bottom of the spreadsheet and vice versa for June.

    Now the formula I use to show the data from the bottom to the table at the top is SUMIF but when the data gets sent from the userform it shows it at the top as 0 even though the number is say 10 at the bottom.

    Any ideas?
    Thanks

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    A simple "if" would be enough if you have only 2 columns:
    =IF($A$1="May",A10,B10)
    and drag down to copy. This is assuming that your may data is in range A10 and below. And June in B10 and below.

    For more than 2 columns, you could use HLOOKUP

    Now the formula I use to show the data from the bottom to the table at the top is SUMIF but when the data gets sent from the userform it shows it at the top as 0 even though the number is say 10 at the bottom.
    Did not understand what you want here. Could you give an example.

    Mangesh

  3. #3
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  4. #4
    Registered User
    Join Date
    05-26-2005
    Posts
    8
    In the Userform code I have an Ok button and in the ok button it has code which copys the textbox value to a certain cell value on the worksheet which I specifiy, below is the code I use:

    Range("B68").Value = TxtBox1

    Then

    The value of B68 is shown in the table I have created if certain condidtions meet. But I use the SUMIF formula which is:

    =SUMIF(B57:I57,C1,B58:I58)

    But the problem is that Excel for some reason does not read the value that the Userform puts in the cell, so If inputted 10 in the userform with the SUMIF formula is reads 0 even though the Cell B68 has 10 written in it but the cell I want it to display in the table reads 0.

  5. #5
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  6. #6
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  7. #7
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  8. #8
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  9. #9
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  10. #10
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  11. #11
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  12. #12
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  13. #13
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  14. #14
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  15. #15
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  16. #16
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    What does your data and your SUMIF formula look like?

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I have a spreadsheet that has a userform which allows a user to input
    > numbers that then get copied back to cells back on the spreadsheet.
    >
    > This works fine, it sends the data from the userform to the
    > spreadsheet.
    >
    > But I have a hidden data part at bottom of spreadsheet with Column1 May
    > and Column2 June and on the userform you send the data for may or june
    > and it gets put in the column. At the top of the spreadsheet I have a
    > table and I only want one month displaying at a time so Cell A1 is the
    > month name and if the user types May the table shows the May data
    > hidden at the bottom of the spreadsheet and vice versa for June.
    >
    > Now the formula I use to show the data from the bottom to the table at
    > the top is SUMIF but when the data gets sent from the userform it shows
    > it at the top as 0 even though the number is say 10 at the bottom.
    >
    > Any ideas?
    > Thanks
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




  17. #17
    Bob Phillips
    Guest

    Re: Help Userforms / Excel SUMIF

    Your SUMIF is adding B58 thru I58, B68 is not part of that range.

    --
    HTH

    Bob Phillips

    "Hopest" <[email protected]> wrote in
    message news:[email protected]...
    >
    > In the Userform code I have an Ok button and in the ok button it has
    > code which copys the textbox value to a certain cell value on the
    > worksheet which I specifiy, below is the code I use:
    >
    > Range("B68").Value = TxtBox1
    >
    > Then
    >
    > The value of B68 is shown in the table I have created if certain
    > condidtions meet. But I use the SUMIF formula which is:
    >
    > =SUMIF(B57:I57,C1,B58:I58)
    >
    > But the problem is that Excel for some reason does not read the value
    > that the Userform puts in the cell, so If inputted 10 in the userform
    > with the SUMIF formula is reads 0 even though the Cell B68 has 10
    > written in it but the cell I want it to display in the table reads 0.
    >
    >
    > --
    > Hopest
    > ------------------------------------------------------------------------
    > Hopest's Profile:

    http://www.excelforum.com/member.php...o&userid=23765
    > View this thread: http://www.excelforum.com/showthread...hreadid=376249
    >




+ 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