Splitting data into two columns - vba

I have a very large Excel spreadsheet that looks like this:
However, I want to move every cell in the second column that starts with Location to the next column.
So it would look like this:

No need of VBA
Enter this formula in C2 and copy till last record
=IF(LEFT(B3,9)="Location:",B3,"")
Then copy paste values in column C, filter column B for Location:* and clear the resulting cells in column B or delete the rows (do as needed).

I would copy column B, paste it in column C then select C1 and press ctrl-- (CTRL and Minus together)
Select shift cells up and click OK.
Then either sort by column A or filter out any with a blank in column A.

You can also use this:
=IF(ISNUMBER(SEARCH("Location",B2)),B2,"")
Then apply conditional formatting to your data range as following:
Final Result

Related

How to use INDEX and MATCH to based to cells?

I have two sheets of data in excel. I want to combine cells to bring the second cell value. Here is an example:
when I enter combining columns name and list must get value form V1 and V2.like this:
I don't have the time to type your data, so this is a rare case of a non-tested formula and may need some tweaking.
For the V1 result: (top screenshot starts in Sheet1 column A, bottom screenshot in Sheet2, column A). This formula goes into cell B2 in Sheet 2:
=Index( Sheet1!$E$2:$E$100, MATCH(Sheet2!a2,INDEX(Sheet1!$A$1:$A$100&" | "&Sheet1!$D$1:$D$100,0),0))
Adjust the first index range from column E to F for the V2 result in C2.
Copy down.
Don't use that approach with whole columns. It will be slow. Use ranges with defined rows.
Of course, if the codes in Sheet1 column A are unique, you don't need to combine them with the value in column D and can look up only the first three characters, like this for V1 (use 6 for V2)
=vlookup(Left(Sheet2!A2,3),Sheet1!$A:$F,5,0)

Populate another sheet with the same columns but only selected rows

I have three columns: in column A I have Suppliers, B has Order Dates and C has Types ("Merchant" and "FBA").
How do I populate another sheet in the same Google Sheets with the same three columns but only with rows that have "FBA" in column C?
I want them to auto-populate so when I add another row in Sheet1 where column C is "FBA", it will automatically add that row to the next available row in Sheet2. I'm guessing I use the Index formula but am unsure how to use it.
Please try something like:
=query(Sheet1!A:C,"where C ='FBA'")

Autofill multiple cells while filling one cell in Excel

The excel data looks like below:
Column A: Name
Column B: Role
Column C: Activity
Column D: Comments
Now in Columns A to C the entries are same and in Column D it is always different. Its like a timesheet of an employee.
So instead of filling Columns A to C the same, I want to put a formula such that when another entry in Column D is made, then Columns A to C are auto populated from the above filled data.
Please help.
You can create two tables using Format as Table:
If I understand you question right, you want to auto populate 2 different cells if a 3rd one is not empty.
Column A: Name
Column B: Role
Column C: Activity
Column D: Comments
Now in Columns A to C the entries are same and in Column D it is always different. Its like a timesheet of an employee.
Now in cells A to C add the following formula
=IF(NOT(ISBLANK(D1)),”Whatever you want in the cell”, “”)
What the function does is it looks if D1 cell is empty (you can also add ranges) and if it’s not; it adds “Whatever you want in the cell” to the cell holding the function; if cell D is empty, it leaves the holding cell empty
Alternatively, you can change the string to expression that fills your cell correctly

How can I use Conditional formatting formula in the filter in the Gsheets to select 2 or more columns where cells that are not empty in both?

so I have ABCDE columns and I want to see rows of the cells that are not empty in the C as well as D column. how do I do this? I know I can have one column do that but that way it would exclude the information in the other column.
Let me know if this doesnt make sense. I'll try to explain with an example
I am a little confused by your question as to whether you are trying to use Conditional Formatting or to create a filter.
If you are trying to use Conditional Formatting:
It sounds like you are trying to highlight a row if there is not a blank cell in column C and not a blank cell in column D of that row.
Create a Conditional Formatting rule with the following:
Apply to Range A1:E1000 <-- (or however many rows of data you have)
Format cells if... SELECT "Custom formula is"
=or(NOT(isblank($C1)),NOT(isblank($D1)))
Formatting style Pick a color to highlight the row
This rule will highlight columns A-E for each row that has data in both column C and column D.

look for Column heading and sum up

I have been working with a excel file with a lot of data, which is arranged in 2 sheets.
I would like to get data from sheet 1 to sheet 2 with reference to the column headings.
For example:
So if I want to find the sum of function 1 person A with criteria 1, the command have to go and find the heading "sum of function 1" in sheet 1 and choose the data that are only under criteria 1 and sum it up in sheet 2 cell D5. (By using column heading reference instead of cell reference).
The table range is A2 : U80.
Thanks.
First you have to format your data as table (select the data -> Menu Insert -> Table). Then you rename your table, for example Table1. Let's say one of the columns you want to sum on the sheet2 is called ColumnName.
On the sheet 2 you write a formula
=SUM(Table1[ColumnName])
The result will be what you are after.
You should try it by SUMIFS(). Syntax will be
=SUMIFS(AgeRange from sheet1,NameRange Sheet1, Name cell Sheet2, PlaceRangeSh1, Place Cell Sh2)
Tell me if requires further help.