Map-like array function in Excel

0 votes

Is there something like a map function in Excel?

For example, let's say I want to apply the formula ABS to a list of items. Something like:

=ABS,{-1,2,3,4,5}

As an example of python-like notation:

# list comprehension
>>> [abs(i) for i in [-1,2,3,4,5]]
[1, 2, 3, 4, 5]

# map
>>> map(abs,[-1,2,3,4,5])
[1, 2, 3, 4, 5]

# passing arbitrary function
>>> map(lambda x:abs(x)+1, [-1,2,4,5,6])
[2, 3, 5, 6, 7]

Is there something similar in Excel?

Jan 9 in Others by Kithuzzz
• 28,900 points
25 views

1 answer to this question.

0 votes

In Excel-365 you can directly use ABS() function with array of data. Try-

=ABS({-1,2,3,4,5})

enter image description here

answered Jan 9 by narikkadan
• 53,520 points

Related Questions In Others

0 votes
1 answer

Does Java have a IN operator or function like SQL

A Java-language was designed to be powerful ...READ MORE

answered May 30, 2022 in Others by Sohail
• 2,960 points
69 views
0 votes
1 answer

Does Java have a "IN" operator or function like SQL?

You can use java.util.Collection.contains() for collections.  If a non-null ...READ MORE

answered May 31, 2022 in Others by nisha
• 2,190 points
108 views
0 votes
1 answer

IF function in combination with an Round function Excel

I'm not sure if it is a ...READ MORE

answered Sep 25, 2022 in Others by narikkadan
• 53,520 points
133 views
0 votes
1 answer

How to use the INDIRECT function in Excel

Try this: =INDEX(INDIRECT($A$1&"!$1:$1048576"),MATCH($B$1,INDI ...READ MORE

answered Sep 29, 2022 in Others by narikkadan
• 53,520 points
153 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hello, yes u can find your birthdate using ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,630 points
215 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

answered Feb 16, 2022 in Others by Edureka
• 13,630 points
395 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,630 points
177 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

answered Feb 18, 2022 in Others by gaurav
• 22,960 points
165 views
0 votes
1 answer

Is there a coalesce-like function in Excel?

To have Excel analyze the formula as ...READ MORE

answered Oct 21, 2022 in Others by narikkadan
• 53,520 points
434 views
0 votes
1 answer

Excel-VBA - How to identify Target range (more than 1 cell) is deleted in a Worksheet_Change function?

You misunderstand the purpose of the function ...READ MORE

answered Sep 23, 2022 in Others by narikkadan
• 53,520 points
1,188 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP