In google sheet I want to compare Column value(f12) with the current date, if its > Current date then show a tag as "a" else "b"
=IF(DAYS360(NOW,C20)<0,"A","b")
IF(Now()<A1,"A", "B")
this link:
https://docs.google.com/spreadsheets/d/1y7H9SI1hbEW9RhLmSQ1JREsI3uBRetG_V_LR7l1DNcw/edit?usp=sharing
Related
I'm trying to copy 2 columns( A and B ) from sheetA to sheetB, based on each different value of column D from sheetA.
I get the week number from "release date" but now i need to create into sheetB 2 columns for each different "week number" and copy the 2 first columns on each week.
I'm getting week numbers using:
If IsDate(c.Value) Then c.Offset(, 1).Value = Format(c.Value, "ww")
But i don't know how to store each different value on "WEEK_NUM" to create the column on sheetB and then copy the row...
That's what i'm trying to obtain:
I have a file coming every month which has few columns with more than 50K rows. I usually need to replace values in column B with different values such as if any field in column B contains ASD , replace it with XYZ. And there is a list of value that needs to be replaced. Also as mentioned above old value can be more than once in column B and needs to be replaced .
Any help would be great.
Thanks
Record a macro [View > Macros > Record Macro]
Do the find+replace operation
Stop recording.
Now view Macros > Edit.
You will see the newly recorded Macro which does the find+replace, and you can edit this to your exact requirements.
Try that:
Sub test()
'this will get you the last row number in column "B"
lastRow = Sheets("SheetName").Cells(Sheets("SheetName").Rows.Count,"B").End(xlUp).Row
'loop through all cells in coulmn "B" and replace text as needed
For i = 1 To lastRow
'you can add multiple lines for each values that needs to be replaced
Sheets("SheetName").Cells(i, 2).Value = Replace(Sheets("SheetName").Cells(i, 2).Value, "ABC", "XYX")
Next i
End Sub
Where 'SheetName' is your sheet's name. Hope that is what you are looking for!
i wrote this code but it gives me #N/A.
Dim item
item=Application.VLookup(CB1.Value,Worksheets("Shete1").Range("D1").CurrentRegion, 1, False)
Column D is the item name and column a is its number and i want to have item number be stored in item.
You can use the combination of index and match to return the value you are looking for.
Example:
item = Application.Index(Worksheets("Sheet1").Range("A:A"),Application.Match(CB1.Value,Worksheets("Sheet1").Range("D1"),False))
Note that "D1" will only search the first cell of column D. If you want to search the whole column then swap out "D1" with "D:D".
I have an excel sheet which contain dates in one column (Say column A) and some values corresponding to each date in another column (Say column E). I want to fetch the value from the cell at the intersection of today's date (in column A) and it's corresponding value (in column E).
The value fetched should be assigned to a different cell (say R1). The value should automatically update in R1 since we need to fetch based on today's date.
Please provide me a formula for cell R1.
Example:
-----A----------B---------C--------D--------E
5/8/2015-------------------------------------3
6/8/2015-------------------------------------3
7/8/2015-------------------------------------6
8/8/2015-------------------------------------10
9/8/2015-------------------------------------3
10/8/2015------------------------------------12
11/8/2015------------------------------------3
If today is 10/08/2015, then cell R1 should be filled with the value 12.
Tomorrow R1 should be filled with the value 3 automatically.
Thank you.
You should try this formula in your cell R1:
=VLOOKUP(NOW(), A1:E11, 5, TRUE)
One thing is that if needed, you should modify range A1:E11 as you like.
ADDED
If your R1 cell is in other sheet, use this formula:
=VLOOKUP(NOW(), sheetname!A5:E11, 5, TRUE)
Here, also has one point that you should modify sheetname to your data sheet name.
I'm assuming you want to solve this with a formula, so try this formula in cell R1
=INDEX(D:D;MATCH(TODAY();A:A;0))
I'm looking to generate a report to list the number of Cities/Towns that don't meet a certain criteria so on Sheet 2 I have an alphabetical list of all the cities/towns.
I want to do a look up/count if function to state if A2(Sheet 2) can be found anywhere in Column D on Sheet 1 then count it if the date in column L (sheet 1) matches the date in Cell $E$1 (sheet 2) and Column A in Sheet 1 is greater than zero.
I originally done this formula but it is returning an error.
=COUNTIFS(PickData!D:D,Sheet1!A2,PickData!L:L,Sheet1!$E$1,PickData!A:A,PickData!A:A>0)
Is there any other formulas that I'm currently not thinking of? Or is it possible to do this via VBA and it returns the value in to column B either True if it matches or False if it doesn't?
Thanks
Al
The problem with your previous formula is in the final criteria. Update to:
=COUNTIFS(PickData!D:D,Sheet1!A2,PickData!L:L,Sheet1!E2,PickData!A:A,">0")