ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using cell reference and wildcards in a forumla (https://www.excelbanter.com/excel-discussion-misc-queries/98609-using-cell-reference-wildcards-forumla.html)

steev_jd

Using cell reference and wildcards in a forumla
 

Hi,

I have a table where I need to total all the subsections of one column
in to another column

i.e.
-------A--------------¦-------B--------¦---------C--------¦-------D----------¦
Trainers -
Red........¦..........9.........¦...Trainers...... ¦........21..........¦
Trainers -
Blue........¦.........3.........¦.....T-Shirts......¦..........10..........¦
Trainers -
Yellow.....¦.........9.........¦......Etc......... ...¦..........Etc........¦
T-Shirt -
Green.......¦.........5.........¦......Etc........ ....¦..........Etc........¦
T-Shirt -
Red..........¦.........5.........¦......Etc....... .....¦..........Etc........¦

I am trying to use a formula like the one below, (although I am not
sure if this in entirely right)

=SUMIF(A1:A9,"Trainers*",B1:B9)

However, rather than type 'trainers' I want the formula to call it from
another cell .i.e.

=SUMIF(A1:A9,C1,B1:B9)

but i still need the wildcard at the end, so the formula will basically
total all entries that begin with the word 'Trainers', the next will
total all the begin with T-Shirt etc.

Any ideas on how to do this?

Thanks in advance,
Steve


--
steev_jd
------------------------------------------------------------------------
steev_jd's Profile: http://www.excelforum.com/member.php...o&userid=33107
View this thread: http://www.excelforum.com/showthread...hreadid=560167


Dav

Using cell reference and wildcards in a forumla
 

=SUMIF(A1:A9,C1&"*",B1:B9)

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=560167


steev_jd

Using cell reference and wildcards in a forumla
 

Hi,

Thanks for your response but I am afraid it doen't work. I just get
every column equaling 0.

Any further suggestions?

Cheers,
Steve


--
steev_jd
------------------------------------------------------------------------
steev_jd's Profile: http://www.excelforum.com/member.php...o&userid=33107
View this thread: http://www.excelforum.com/showthread...hreadid=560167


steev_jd

Using cell reference and wildcards in a forumla
 

Sorry - That does work!! Thanks!


--
steev_jd
------------------------------------------------------------------------
steev_jd's Profile: http://www.excelforum.com/member.php...o&userid=33107
View this thread: http://www.excelforum.com/showthread...hreadid=560167



All times are GMT +1. The time now is 08:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com