Harley is right, you can't set dynamic values for fromname/fromemail from the email itself b/c of order of operations. But, you could have logic based on data pulled from the DE/Subscriber attributes inside a Code Snippet or Content Area (NOT a Content Block) and use ContentBlockByName() or ContentAreaByName() (depending on which you use) to pull in the Code Snippet/Content Area.
Also, you can put that logic directly in the From Email and From Name fields.
Here's an example of the coding directly in the fields where all From Names are stored in a separate Data Extension (DE), and the audience has a field of SubscriberBrand whose value matches the Brand value in the DE:
%%=LookUp("ENT.FromNames", "from_name", "Brand", "%%SubscriberBrand%%")=%%
Make note, I've quoted the %%SubscriberBrand%% value! This is because of order of operations funkiness... The interpreter will do a first pass and convert %%SubscriberBrand%% to the string Cool Stuff (assuming Cool Stuff is a brand in my business). So first pass leaves your code like this:
%%=LookUp("ENT.FromNames", "from_name", "Brand", "Cool Stuff")=%%
Then it will execute the lookUp. If I had left the quotes out, it would have instead looked like this after the interpreter's first pass:
%%=LookUp("ENT.FromNames", "from_name", "Brand", Cool Stuff)=%%
Then the LookUp call is going to try to find constants Cool and Stuff and will fail horribly and you won't know why (b/c the errors caused are only visible on the backend).
Here's another more complex example:
%%=IIF("%%EventCategoryID%%" == 'CB34459E-XXXX-4550-XXXX-XXXXXXXXXXX', 'Cool Stuff', IIF("%%EventCategoryID%%" == 'CB34459E-YYYY-4550-YYYY-ZZZZZZZZZZZ', 'Super Rad', 'Boffo!')=%%
Notice that both instances of %%EventCategoryID%% are again wrapped in quotes. This code uses nested IIF() functions to mimic an IF/ELSEIF/ELSE scenario. It's long, and all on one line (sorry for the side-scrolling), but it will do the trick. When you get more than a few options, though, storing in a separate DE is usually best, assuming you can account for all possibilities.