I have a question about Excel How Can I extract two digits from Column B if Column B is empty extract two digits from column A. I know how to extract two digit from Column B but cannot understand how to do it if column B is empty.
for example: in column B in first row we have 123456 number we extract first 2 digits to column C, but in next row in column B is empty but column A is not empty and we need to extract number from column A.
Thanks for helping!
You must check the contents of the cells and extracts the digits if not blank
C2
=IF(B2="",IF(A2="","",LEFT(A2,2)),LEFT(B2,2))
Bye
You have to use the =ISBLANK function along with an IF statement to check the specific column in B, if it is empty, take the value from A.
Related
enter image description here
I need to do this in excel and I do know how to do this with python etc, but it has to be done in excel either VBA or formula (best option).
Column A, contains a "W" character.
Column B, contains a "abc" cell that will be the same everywhere (The other rows won't be the same).
Column C, I am concatenating all cells in column B before column A hits a "W" value.
I want to achieve some sort of a formula in a single or multiple steps that will allow me to concatenate all B column rows until column A has a "W". The concatenation must happen in same row as "abc" in column B, but paste on column C.
Thank you in advance
If you can use column D (as an intermediate step) as well as C, set C2 to
=IF(A2="W",D2,"")
and set D2 to
=B2&IF(A3="W","",";;"&D3)
then copy column C and D down as far as necessary.
On non-vba excel, I was trying to use this equation:
=IF(LEFT($A1,4)=LEFT($C1,4), VLOOKUP((LEFT($A1,4)&"*"),C1:C1,1,FALSE), "there")
but it is not always accurate because it is not offsetting when the word "there" used on the cell.
I need it to:
Look at the first three letters of Column A and match them to Column C.
Copy the contents of column C into Column B or if it is not a match then write "there".
Then go to the next empty cell look at the first three letters of column A and match them to the next set on column C.
I think I have to do a counter for both column A and column C but then I get lost.
Any help with this will be very much appreciated.
Paste the below formula in column B, LEFT
=IF(LEFT($A1,3)=LEFT($C1,3),$C1,"there")
Hope this is what you are expecting
I have two columns, A, B and C,
Column A has two text values "Petrol" & "Butane"
column B has just numeric values (i.e their cost in USD)
I need to run a formula in column C so i can check column A for "Petrol" and check corresponding rows in Column B for their value and then get a SUM of those numeric values as a total cost in column C
Any help would be appreciated!
Thanks
=SUMIF(A:A,"Petrol",B:B)
And
=SUMIF(A:A,"Butane",B:B)
Any cell you put this in will return the sum of all cells in column B where the value on the same row but in column A is equal to the word.
You can use the ISTEXT function
=ISTEXT(A2) Checks to see if cell A2 has text (TRUE)
Both columns A & B have phone numbers. Each of the 50,000 column B does appear in the column A with 391,000 too.
I just want the 50,000 column B to have each number matched up with the same ROW as the 391k column A.
This way the same row for both column A and column B have the same value if the data is in both rows. If there is a phone number on the 391k list, but not on the 50k list, then in that row, column A would have a phone number, and column B would be blank.
Move Column B data to Column D
Then in Column B, use the following formula cell (B2) as an example.
=vlookup(A2,D:D,1,0)
That will match the value in A with the list in column D. Copy and paste special values and you are done.
In cell C1 and copied down to the last phone number in column A:
=IF(COUNTIF($B$1:$B$50000,A1)=0,"",A1)
Then hide column B.
I need help with a formula.
In Column A I have a list of numbers or text.
In column B, I have another list of numbers or text, but for example in cell B 10 is the same a number or text as in cell A55. I need a formula in column C10 that will show that the cells B10 and A55 same.
Columns A and B contain different data (text or numbers) but there is a possibility that in column B may be repeated as the data in column A.
In A column I have about 250 different data in column B maximum of 15, so I need a formula for Column C that will indicate if a value in column B repeats.
I need a formula for excel 2003
This will give you the row number of the first object found in Column A which is repeated in a cell of column B.
=IFERROR(MATCH(B1,A:A,0),"")
With your figures: