• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to map out Number IDs to Labels (Identifiers) in Google Sheets

Resolved: How to map out Number IDs to Labels (Identifiers) in Google Sheets

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want to map out number ranges into labels and have a specific cell return the label if it contains the numbers.
Let’s say we have these number ranges.
3550000..3559999 | ProductA
3640000..3649999 | ProductB
5250000..5259999 | ProductC
How would I define these ranges of numbers into labels?
Then check if a specific cell contains something like, ‘3642515’ return what product it belongs to? Thanks so much!

Answer:

if A1 = 3642515
try:
=VLOOKUP(A1, {3550000, ProductA; 
              3640000, ProductB; 
              5250000, ProductC}, 2, 1)

If you have better answer, please add a comment about this, thank you!

arrays google-sheets google-sheets-formula vlookup
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to make statement case insensitive when uploading a dta file with specified columns?

27/03/2023

Resolved: Sort dataframe columns value by close it to another column

27/03/2023

Resolved: PostgreSQL resample 1 minute OHLCV candle data into 5 minute OHLCV candle data

27/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.