LEFT / Smart Contract Dev

Identify Wallet Address Type

I need to check if the address starts with '0x' to confirm it is an Ethereum-compatible address.

formula.xlsx
=IF(LEFT(A2, 2)="0x", "Ethereum", "Other")

How it works: The LEFT function extracts a specified number of characters from the beginning of a text string. In this scenario, `LEFT(A2, 2)` extracts the first two characters of the wallet address in cell A2. The IF function then checks if these two characters are exactly '0x'. If they are, it returns 'Ethereum', indicating an Ethereum-compatible address; otherwise, it returns 'Other', for non-Ethereum addresses.

Data Setup

Wallet Address Address Type
0xAbCdEfGhIjKlMnOpQrStUvWxYz1234567890
bc1qxyz... (Bitcoin address)
0x1234567890AbCdEfGhIjKlMnOpQrStUvWxYz
cosmos1abc... (Cosmos address)

Step-by-Step Guide

1

Enter your list of wallet addresses into a column (e.g., Column A, starting from cell A2).

2

In an adjacent cell (e.g., B2), type the formula: `=IF(LEFT(A2, 2)="0x", "Ethereum", "Other")`.

3

Press Enter to apply the formula to the first wallet address.

4

Drag the fill handle (the small square at the bottom-right corner of cell B2) down to apply the formula to all other wallet addresses in your list.