Convert SUMIFS Lookup Range from Number to Text

ajones

Board Regular
Joined
Oct 26, 2002
Messages
106
I have a formula (simplified example) =SUMIFS( A1:A10 , B1:B10 , 3 & "*")
My problem is B1:B10 are numbers and not text. As 3&"*" will always be text I need to convert the range to text. I would really like to to keep the column itself as text and to do the conversion in the formula. However I can't find any text functions that work on an array even (ctr-shift-enter).

Any ideas or thoughts to something like =SUMIFS( maketext(A1:A10) , B1:B10 , 3 & "*")

This is in Excel 365.

thanks

Alan
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Are the numbers a fixed number of digits or variable?
If fixed, something like this will work.
Excel Formula:
=SUMIFS(A1:A10,B1:B10,">=30000",B1:B10 ,"<=39999")
 
Upvote 0
Are the numbers a fixed number of digits or variable?
If fixed, something like this will work.
Excel Formula:
=SUMIFS(A1:A10,B1:B10,">=30000",B1:B10 ,"<=39999")
thanks for the response.... interesting idea... unfortunately I may have simplified it to to much as the 3 in "3 & "*" " is really referencing another cell that will vary based on the row.

Something like this

=SUMIFS( maketext(A1:A10) , B1:B10 , D1 & "*")

That makes it harder and why i was waning an array to text type formula.

thanks for the good idea though.
 
Upvote 0
Perhaps
Excel Formula:
 =sumproduct(--(left(b1:b10,1)="3"),a1:a10)
Works with text or numbers
 
Upvote 0
the 3 in "3 & "*" " is really referencing another cell that will vary based on the row.
If the number of digits is fixed then it could still work.

As you said, you may have simplified it too much. The more detail you give us to work with, the better the answer we give you.
For 5 digit numbers this will work and more efficiently than sumproduct on an equal size range.
Excel Formula:
=SUMIFS(A1:A10,B1:B10,">="&D1&"0000",B1:B10,"<"&D1+1&"0000")
 
Upvote 0
If the number of digits is fixed then it could still work.

As you said, you may have simplified it too much. The more detail you give us to work with, the better the answer we give you.
For 5 digit numbers this will work and more efficiently than sumproduct on an equal size range.
Excel Formula:
=SUMIFS(A1:A10,B1:B10,">="&D1&"0000",B1:B10,"<"&D1+1&"0000")
I had debated about using sumproduct(). I really like sumproduct, but people coming behind me is is harder for them to understand. That and I really like the wild card option in SUMIFS. I wish they would add support for that in SUMPRODUCT().

Thanks for the ideas.
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top